diff options
author | Dave LeRoy <dleroy@labn.net> | 2024-07-18 19:19:30 +0200 |
---|---|---|
committer | Dave LeRoy <dleroy@labn.net> | 2024-07-18 22:27:40 +0200 |
commit | c531584a37bb34e7d8cf62887fd27c701270cd4b (patch) | |
tree | d7c356bef2d186b230ec2d0bfe959cd525ccd0be /nhrpd | |
parent | Merge pull request #16415 from nabahr/ospfv3_hello_tests (diff) | |
download | frr-c531584a37bb34e7d8cf62887fd27c701270cd4b.tar.xz frr-c531584a37bb34e7d8cf62887fd27c701270cd4b.zip |
nhrpd: Fixes auth no redirect bug
The nhrp_peer_forward() routine was not explicitly handling the
Authentication Extension in the switch statement and instead fell
through to the default case which checked whether this was an
unhandled Compulsory extension and errored out, never forwarding
the Resolution Request.
Fix bug #16371
Signed-off-by: Dave LeRoy <dleroy@labn.net>
Diffstat (limited to 'nhrpd')
-rw-r--r-- | nhrpd/nhrp_peer.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c index 2414541bf..0407b86be 100644 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -1046,6 +1046,13 @@ static void nhrp_peer_forward(struct nhrp_peer *p, zbuf_put(zb, extpl.head, len); } break; + case NHRP_EXTENSION_AUTHENTICATION: + /* At this point, received packet has been authenticated. + * Just need to regenerate auth extension before forwarding. + * This will be done below in nhrp_packet_complete_auth(). + */ + break; + default: if (htons(ext->type) & NHRP_EXTENSION_FLAG_COMPULSORY) /* FIXME: RFC says to just copy, but not @@ -1064,7 +1071,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p, nhrp_ext_complete(zb, dst); } - nhrp_packet_complete_auth(zb, hdr, pp->ifp, false); + nhrp_packet_complete_auth(zb, hdr, pp->ifp, true); nhrp_peer_send(p, zb); zbuf_free(zb); zbuf_free(zb_copy); |