diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:45:09 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2008-10-26 22:45:09 +0100 |
commit | 4847a894bf7d4852325c3f1ea4bb4890054a1f66 (patch) | |
tree | 46d0f400b9e6fc3dfaf64d7058c473e44501ddc1 /proto/bgp/packets.c | |
parent | d51aa2819005a03e4cfb6f62333be6ccadfb3c06 (diff) |
Implementation of route reflection for BGP
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 0dd920e4..8a352c68 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -193,7 +193,7 @@ bgp_create_update(struct bgp_conn *conn, byte *buf) if ((buck = p->withdraw_bucket) && !EMPTY_LIST(buck->prefixes)) { DBG("Withdrawn routes:\n"); - tmp = bgp_attach_attr(&ea, bgp_linpool, BA_MP_UNREACH_NLRI, remains-8); + tmp = bgp_attach_attr_wa(&ea, bgp_linpool, BA_MP_UNREACH_NLRI, remains-8); *tmp++ = 0; *tmp++ = BGP_AF_IPV6; *tmp++ = 1; @@ -218,7 +218,7 @@ bgp_create_update(struct bgp_conn *conn, byte *buf) size = bgp_encode_attrs(p, w, buck->eattrs, 1024); w += size; remains -= size; - tstart = tmp = bgp_attach_attr(&ea, bgp_linpool, BA_MP_REACH_NLRI, remains-8); + tstart = tmp = bgp_attach_attr_wa(&ea, bgp_linpool, BA_MP_REACH_NLRI, remains-8); *tmp++ = 0; *tmp++ = BGP_AF_IPV6; *tmp++ = 1; @@ -702,7 +702,7 @@ bgp_do_rx_update(struct bgp_conn *conn, /* Create fake NEXT_HOP attribute */ if (len < 1 || (*x != 16 && *x != 32) || len < *x + 2) goto bad; - memcpy(bgp_attach_attr(&a0->eattrs, bgp_linpool, BA_NEXT_HOP, 16), x+1, 16); + bgp_attach_attr_ip(&a0->eattrs, bgp_linpool, BA_NEXT_HOP, x[1]); len -= *x + 2; x += *x + 1; |