summaryrefslogtreecommitdiff
path: root/nhrpd/nhrp_vty.c
diff options
context:
space:
mode:
authorJoshua Muthii <jmuthii@labn.net>2024-10-29 12:08:14 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-11-05 15:11:07 +0000
commita5c5a2fd24c1016ce0919b827c77be583daaf0ab (patch)
treea3d443fbaf56e0bef4da10cc2a35def1dde64995 /nhrpd/nhrp_vty.c
parente127b7f46484ae461f9fd437ef3660828600aefc (diff)
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> (cherry picked from commit 5718ee37c7717f61094a40168dae18c6d607ec44)
Diffstat (limited to 'nhrpd/nhrp_vty.c')
-rw-r--r--nhrpd/nhrp_vty.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c
index f202576960..199f4d75d4 100644
--- a/nhrpd/nhrp_vty.c
+++ b/nhrpd/nhrp_vty.c
@@ -467,7 +467,6 @@ DEFUN(if_no_nhrp_holdtime, if_no_nhrp_holdtime_cmd,
return CMD_SUCCESS;
}
-#define NHRP_CISCO_PASS_LEN 8
DEFPY(if_nhrp_authentication, if_nhrp_authentication_cmd,
AFI_CMD "nhrp authentication PASSWORD$password",
AFI_STR