diff options
| author | Russ White <russ@riw.us> | 2021-11-29 11:05:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-29 11:05:11 -0500 |
| commit | 85d1d680ab0eb4fb178c6f80a10588694e045dd7 (patch) | |
| tree | 4c82a0b836d782095163e89cfcd019c165c0bf75 /ospf6d/ospf6_message.c | |
| parent | 5c24a442d997aefb606ccdc47f2684adf6e7241b (diff) | |
| parent | 3af858bbcfc1f49c58ac9ca7c0592b9af81f7b35 (diff) | |
Merge pull request #10018 from ckishimo/ospf6d_bitN
ospf6d: check N-bit in Hello packet
Diffstat (limited to 'ospf6d/ospf6_message.c')
| -rw-r--r-- | ospf6d/ospf6_message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 9238b81c5f..352cb137ed 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -431,6 +431,14 @@ static void ospf6_hello_recv(struct in6_addr *src, struct in6_addr *dst, return; } + /* N-bit check */ + if (OSPF6_OPT_ISSET(hello->options, OSPF6_OPT_N) + != OSPF6_OPT_ISSET(oi->area->options, OSPF6_OPT_N)) { + zlog_warn("VRF %s: IF %s N-bit mismatch", + oi->interface->vrf->name, oi->interface->name); + return; + } + /* Find neighbor, create if not exist */ on = ospf6_neighbor_lookup(oh->router_id, oi); if (on == NULL) { |
