From 762f54f088367b8af0556884608651b593dadbff Mon Sep 17 00:00:00 2001 From: zmw12306 Date: Tue, 25 Apr 2023 14:37:28 -0400 Subject: [PATCH] ripd: add non-zero check for RIPv1 reserved field, According to RFC2453 3.6, the tag of a RIP-1 entry should be zero Signed-off-by: zmw12306 --- ripd/ripd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ripd/ripd.c b/ripd/ripd.c index fb3d574aa..9167a4fa7 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1171,6 +1171,12 @@ static void rip_response_process(struct rip_packet *packet, int size, continue; } + if (packet->version == RIPv1 && rte->tag != 0) { + zlog_warn("RIPv1 reserved field is nonzero: %d", + ntohs(rte->tag)); + continue; + } + /* - is the destination address valid (e.g., unicast; not net 0 or 127) */ if (!rip_destination_check(rte->prefix)) { -- 2.39.2