diff options
author | zmw12306 <zmw12306@gmail.com> | 2023-04-25 20:37:28 +0200 |
---|---|---|
committer | zmw12306 <zmw12306@gmail.com> | 2023-04-25 21:17:01 +0200 |
commit | 762f54f088367b8af0556884608651b593dadbff (patch) | |
tree | 619df04e7909243925c7e48336206473b851c6a0 /ripd | |
parent | Merge pull request #13149 from pushpasis/mgmt_cleanup_zlog (diff) | |
download | frr-762f54f088367b8af0556884608651b593dadbff.tar.xz frr-762f54f088367b8af0556884608651b593dadbff.zip |
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 <zmw12306@gmail.com>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/ripd.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)) { |