diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-16 17:40:44 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-16 17:40:44 +0200 |
commit | 8bd9b930c320f09d3b3792b5f991cf702e9d55be (patch) | |
tree | 87f6e66b1a9d302d703bc2fb7af804658681c927 /proto/bgp | |
parent | 48bc232f08141d26691237c3d79db587ce16932b (diff) |
Fixes a bug in IPv6 BGP next hop processing.
BGP next hop attributes with empty link-local IPv6 addresses were not
handled properly.
Thanks to Sergey Popovich for the bugfix.
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/packets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index cfa37fb5..f2e03f87 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -820,7 +820,7 @@ bgp_set_next_hop(struct bgp_proto *p, rta *a) ip_addr *nexthop = (ip_addr *) nh->u.ptr->data; #ifdef IPV6 - int second = (nh->u.ptr->length == NEXT_HOP_LENGTH); + int second = (nh->u.ptr->length == NEXT_HOP_LENGTH) && ipa_nonzero(nexthop[1]); /* First address should not be link-local, but may be zero in direct mode */ if (ipa_has_link_scope(*nexthop)) |