Merge pull request #13366 from zmw12306/rte_tag

ripd: add non-zero check for RIPv1 reserved field
This commit is contained in:
Donatas Abraitis 2023-05-02 17:56:09 +03:00 committed by GitHub
commit da57946b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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)) {