summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-09-12 23:03:27 +0000
committerMikael Magnusson <mikma@users.sourceforge.net>2019-02-27 21:28:38 +0100
commitb8c0bc361f4a869a2bb96cd9641d88becbc3296e (patch)
treeeee69eaf09ce7e38b5b292f2f4289409944733c7 /proto/bgp
parent7c36eb3e8bd7d06f65dc7319d42b6abe782c5b89 (diff)
link-local: WIPold/ipv4-link-local
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/packets.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 26716573..8f667d9f 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -1024,6 +1024,9 @@ bgp_decode_next_hop_ip(struct bgp_parse_state *s, byte *data, uint len, rta *a)
{
nh[0] = ipa_from_ip4(get_ip4(data));
nh[1] = IPA_NONE;
+
+ if (ipa_is_link_local(nh[0]))
+ { nh[1] = nh[0]; nh[0] = IPA_NONE; }
}
else if (len == 16)
{