diff options
| author | zmw12306 <zmw12306@gmail.com> | 2023-04-25 14:37:28 -0400 |
|---|---|---|
| committer | zmw12306 <zmw12306@gmail.com> | 2023-04-25 15:17:01 -0400 |
| commit | 762f54f088367b8af0556884608651b593dadbff (patch) | |
| tree | 619df04e7909243925c7e48336206473b851c6a0 /ripd | |
| parent | 9b96394d05171db4ec44a46c120db07d94014688 (diff) | |
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 fb3d574aaa..9167a4fa70 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)) { |
