]> The Tcpdump Group git mirrors - tcpdump/commitdiff
do not convert protocol to names if -n flag
authorMichael Richardson <[email protected]>
Sun, 8 Apr 2012 00:32:04 +0000 (20:32 -0400)
committerMichael Richardson <[email protected]>
Sun, 8 Apr 2012 00:32:04 +0000 (20:32 -0400)
print-ip.c

index 3b33fee325cac114a83148683623590f43edf307..494eb2958e656ebadb964f35305dab088a6c4e6b 100644 (file)
@@ -482,7 +482,7 @@ again:
                break;
 
        default:
-               if ((proto = getprotobynumber(ipds->nh)) != NULL)
+               if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL)
                        ND_PRINT((ndo, " %s", proto->p_name));
                else
                        ND_PRINT((ndo, " ip-proto-%d", ipds->nh));