summaryrefslogtreecommitdiffstats
path: root/proto/bgp/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:48:02 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-10-26 22:48:02 +0100
commitba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee (patch)
tree794368482cc653d27694ba541b9455c2863c2321 /proto/bgp/packets.c
parent4847a894bf7d4852325c3f1ea4bb4890054a1f66 (diff)
downloadbird-ba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee.tar
bird-ba5ed6f3e4eb4b2899cdad08e2edb99063bfbcee.zip
Implementation of an option for disabling AS4 support per BGP instance.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r--proto/bgp/packets.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 8a352c6..c18c6e4 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -73,7 +73,7 @@ bgp_create_open(struct bgp_conn *conn, byte *buf)
#ifdef IPV6
cap = bgp_put_cap_ipv6(conn, cap);
#endif
- if (bgp_as4_support)
+ if (p->cf->enable_as4)
cap = bgp_put_cap_as4(conn, cap);
cap_len = cap - buf - 12;
@@ -407,7 +407,8 @@ bgp_parse_capabilities(struct bgp_conn *conn, byte *opt, int len)
if (cl != 4)
goto err;
p->as4_support = 1;
- if (bgp_as4_support)
+ p->as4_session = p->cf->enable_as4;
+ if (p->as4_session)
conn->advertised_as = get_u32(opt + 2);
break;