/* RFC 1058 */
family = EXTRACT_16BITS(&ni->rip_family);
- if (family != BSD_AFNUM_INET) {
+ if (family != BSD_AFNUM_INET && family != 0) {
printf("\n\t AFI %s, ", tok2str(bsd_af_values, "Unknown (%u)", family));
print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN);
return;
/* MBZ fields not zero */
print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN);
return;
+ }
+ if (family == 0) {
+ printf("\n\t AFI 0, %s, metric: %u",
+ ipaddr_string(&ni->rip_dest),
+ EXTRACT_32BITS(&ni->rip_metric));
+ return;
} /* BSD_AFNUM_INET */
printf("\n\t %s, metric: %u",
ipaddr_string(&ni->rip_dest),
EXTRACT_16BITS(&ni->rip_tag));
print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",RIP_AUTHLEN);
}
- } else if (family != BSD_AFNUM_INET) {
+ } else if (family != BSD_AFNUM_INET && family != 0) {
printf("\n\t AFI %s", tok2str(bsd_af_values, "Unknown (%u)", family));
print_unknown_data((u_int8_t *)&ni->rip_tag,"\n\t ",RIP_ROUTELEN-2);
return;
- } else { /* BSD_AFNUM_INET */
+ } else { /* BSD_AFNUM_INET or AFI 0 */
printf("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ",
- tok2str(bsd_af_values, "Unknown (%u)", family),
+ tok2str(bsd_af_values, "%u", family),
ipaddr_string(&ni->rip_dest),
mask2plen(EXTRACT_32BITS(&ni->rip_dest_mask)),
EXTRACT_16BITS(&ni->rip_tag),
return;
switch (rp->rip_cmd) {
+ case RIPCMD_REQUEST:
case RIPCMD_RESPONSE:
j = length / sizeof(*ni);
printf(", routes: %u",j);
printf("[|rip]");
break;
- case RIPCMD_REQUEST:
case RIPCMD_TRACEOFF:
case RIPCMD_POLL:
case RIPCMD_POLLENTRY:
--- /dev/null
+IP (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+ 10.0.0.20.520 > 10.0.0.255.520:
+ RIPv1, Request, length: 24, routes: 1
+ AFI 0, 0.0.0.0, metric: 16
+IP (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+ 10.0.0.20.520 > 10.0.0.255.520:
+ RIPv1, Response, length: 24, routes: 1
+ 10.70.178.0, metric: 1
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+ 10.0.0.20.520 > 224.0.0.9.520:
+ RIPv2, Request, length: 24, routes: 1
+ AFI 0, 0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+ 10.0.0.20.520 > 224.0.0.9.520:
+ RIPv2, Response, length: 24, routes: 1
+ AFI IPv4, 10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self