]> git.puffer.fish Git - mirror/frr.git/commit
nhrpd: Modify NHRP authentication feature logging 17115/head
authorJoshua Muthii <jmuthii@labn.net>
Tue, 29 Oct 2024 16:08:14 +0000 (12:08 -0400)
committerJoshua Muthii <jmuthii@labn.net>
Tue, 29 Oct 2024 17:15:43 +0000 (13:15 -0400)
commit5718ee37c7717f61094a40168dae18c6d607ec44
tree2819e16bbe191941caa5a7cd7eb64b402737f413
parentd599aa1da6392c5d116df6bf2fa6bbc5b7b879c3
nhrpd: Modify NHRP authentication feature logging

Modified nhrp_connection_authorized(). Initially, when writing debug
information about incoming NHRP packets with authentication enabled,
the nhrp_connection_authorized() function would print the
passphrase of the incoming packet as if it were a null terminated
string. This meant that if the passphrase on the incoming packet
had non ASCII-complient bytes in it, it would attempt to print those
bytes anyway. There was also no check that the size of the passphrase in
the incoming packet matched the size of the passphrase on the interface.
The changes in this commit log the passphrase on the incoming packet as
well as the passphrase on interface in HEX to avoid issues with ASCII.
It also performs a check that accounts for the sizes of the two different
passphrases

Moved CISCO_PASS_LENGTH_LEN from nhrp_vty.c to nhrp_protocol.h
for easier access  to the macro in other files

Signed-off-by: Joshua Muthii <jmuthii@labn.net>
nhrpd/nhrp_peer.c
nhrpd/nhrp_protocol.h
nhrpd/nhrp_vty.c