/* \summary: Protocol Independent Multicast (PIM) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
break;
default:
return -1;
- break;
}
hdrlen = 0;
}
if (af == AFNUM_IP) {
if (!silent)
ND_PRINT("%s", GET_IPADDR_STRING(bp));
- }
- else if (af == AFNUM_IP6) {
+ } else if (af == AFNUM_IP6) {
if (!silent)
ND_PRINT("%s", GET_IP6ADDR_STRING(bp));
}
if (GET_U_1(bp + 1) != 32)
ND_PRINT("/%u", GET_U_1(bp + 1));
}
- }
- else if (af == AFNUM_IP6) {
+ } else if (af == AFNUM_IP6) {
if (!silent) {
ND_PRINT("%s", GET_IP6ADDR_STRING(bp + 2));
if (GET_U_1(bp + 1) != 128)
case PIMV2_TYPE_HELLO:
{
uint16_t otype, olen;
- while (len > 0) {
+ while (len != 0) {
if (len < 4)
goto trunc;
otype = GET_BE_U_2(bp);
ND_PRINT("[option length %u != 4]", olen);
nd_print_invalid(ndo);
return;
- break;
}
break;