mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
BGP: Handle missing NEXT_HOP attribute properly
RFC 7606 specifies handle-as-withdraw instead of session reset.
This commit is contained in:
parent
18b4f2082c
commit
9c9050ff12
@ -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))
|
if (!BIT32_TEST(s->attrs_seen, BA_AS_PATH))
|
||||||
{ REPORT(NO_MANDATORY, "AS_PATH"); goto withdraw; }
|
{ 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
|
/* When receiving attributes from non-AS4-aware BGP speaker, we have to
|
||||||
reconstruct AS_PATH and AGGREGATOR attributes; RFC 6793 4.2.3 */
|
reconstruct AS_PATH and AGGREGATOR attributes; RFC 6793 4.2.3 */
|
||||||
if (!p->as4_session)
|
if (!p->as4_session)
|
||||||
|
Loading…
Reference in New Issue
Block a user