From: zmw12306 Date: Mon, 24 Mar 2025 19:32:18 +0000 (-0400) Subject: babeld: Hop Count must not be 0. X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3b5d4212074fa15404a221e1bce2a75deda8ca89;p=matthieu%2Ffrr.git babeld: Hop Count must not be 0. According to RFC 8966: Hop Count The maximum number of times that this TLV may be forwarded, plus 1. This MUST NOT be 0. Signed-off-by: zmw12306 --- diff --git a/babeld/message.c b/babeld/message.c index 5a33d5c288..15022093c5 100644 --- a/babeld/message.c +++ b/babeld/message.c @@ -693,6 +693,10 @@ parse_packet(const unsigned char *from, struct interface *ifp, memcpy(src_prefix, zeroes, 16); src_plen = 0; } + if(message[6] == 0) { + debugf(BABEL_DEBUG_COMMON, "Received seqno request with invalid hop count 0"); + goto done; + } rc = parse_request_subtlv(message[2], message + 4 + rc, len - 2 - rc, src_prefix, &src_plen); if(rc < 0)