Skip to content

Commit 6992aba

Browse files
committed
Recognize upper-case protocol names for -P.
That's what README.FIRST documents.
1 parent 02b30f4 commit 6992aba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sniffit.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,13 +1629,13 @@ int main (int argc, char *argv[])
16291629
break;
16301630
case 'P':
16311631
strlower (optarg);
1632-
if (strstr (optarg, "tcp"))
1632+
if (strstr (optarg, "tcp") || strstr (optarg, "TCP"))
16331633
PROTOCOLS |= F_TCP;
1634-
if (strstr (optarg, "icmp"))
1634+
if (strstr (optarg, "icmp") || strstr (optarg, "ICMP"))
16351635
PROTOCOLS |= F_ICMP;
1636-
if (strstr (optarg, "udp"))
1636+
if (strstr (optarg, "udp") || strstr (optarg, "UDP"))
16371637
PROTOCOLS |= F_UDP;
1638-
if (strstr (optarg, "ip"))
1638+
if (strstr (optarg, "ip") || strstr (optarg, "IP"))
16391639
PROTOCOLS |= F_IP;
16401640
break;
16411641
case 's':

0 commit comments

Comments
 (0)