diff options
author | Martin Mares <mj@ucw.cz> | 2000-04-26 15:26:31 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-04-26 15:26:31 +0200 |
commit | 5db9bae28676d743f53636d74997c85039d09278 (patch) | |
tree | 70aea1525df4376d886203a6da9d2e583ba794ed | |
parent | e1ddd9937759bc22b7241e48400d17840a101d9d (diff) | |
download | bird-5db9bae28676d743f53636d74997c85039d09278.tar bird-5db9bae28676d743f53636d74997c85039d09278.zip |
IBGP fixes.
-rw-r--r-- | proto/bgp/attrs.c | 22 | ||||
-rw-r--r-- | proto/bgp/bgp.c | 1 |
2 files changed, 16 insertions, 7 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 6b8332b..74e2ef8 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -343,12 +343,20 @@ bgp_get_bucket(struct bgp_proto *p, ea_list *old, ea_list *tmp, int originate) struct bgp_bucket *b; /* Merge the attribute lists */ - for(t=tmp; t->next; t=t->next) - ; - t->next = old; - new = alloca(ea_scan(tmp)); - ea_merge(tmp, new); - t->next = NULL; + if (tmp) + { + for(t=tmp; t->next; t=t->next) + ; + t->next = old; + new = alloca(ea_scan(tmp)); + ea_merge(tmp, new); + t->next = NULL; + } + else + { + new = alloca(ea_scan(old)); + ea_merge(old, new); + } ea_sort(new); /* Normalize attributes */ @@ -668,7 +676,7 @@ bgp_path_loopy(struct bgp_proto *p, eattr *a) while (len > 0) { n = path[1]; - len -= 2 - 2*n; + len -= 2 + 2*n; path += 2; for(i=0; i<n; i++) { diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 1be652f..0939f69 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -315,6 +315,7 @@ bgp_start_neighbor(struct bgp_proto *p) s->tos = IP_PREC_INTERNET_CONTROL; s->ttl = 1; s->rbsize = BGP_RX_BUFFER_SIZE; + s->tbsize = BGP_TX_BUFFER_SIZE; s->rx_hook = bgp_incoming_connection; if (sk_open(s)) { |