summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-06-19 14:32:16 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-06-19 14:32:16 +0200
commit1ef23f05ee00394e6a2748f658b73c20d3ff7c45 (patch)
tree2c23f431e18d7b0b27da6734f6c12a2428c09631 /proto/bgp
parent13c0be19d3d2acc9c1636bbab9222aabdf27d7ac (diff)
parentcaa9d03d65ce827ce536d54b26988e70767e032f (diff)
Merge branch 'int-new' into HEAD
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/attrs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index d65f6334..8ecfaaa2 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1109,6 +1109,9 @@ bgp_decode_attrs(struct bgp_parse_state *s, byte *data, uint len)
if (!BIT32_TEST(s->attrs_seen, BA_AS_PATH))
{ REPORT(NO_MANDATORY, "AS_PATH"); goto withdraw; }
+ if (s->ip_reach_len && !BIT32_TEST(s->attrs_seen, BA_NEXT_HOP))
+ { REPORT(NO_MANDATORY, "NEXT_HOP"); goto withdraw; }
+
/* When receiving attributes from non-AS4-aware BGP speaker, we have to
reconstruct AS_PATH and AGGREGATOR attributes; RFC 6793 4.2.3 */
if (!p->as4_session)