summaryrefslogtreecommitdiffstats
path: root/lib/icmp.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-10 23:04:59 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-10 23:04:59 +0100
commitf1b2412ed58f56e86a70697ae3eaf55c585c39fe (patch)
tree66e18088268042cc3b018d20e3895d2cb3036f35 /lib/icmp.c
parent834f20138660369342cea889e8ce81bccf3ab976 (diff)
Support case-insensitive ICMP and ICMPv6 type/code names.
Diffstat (limited to 'lib/icmp.c')
-rw-r--r--lib/icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/icmp.c b/lib/icmp.c
index 93276e2..c749272 100644
--- a/lib/icmp.c
+++ b/lib/icmp.c
@@ -70,7 +70,7 @@ int name_to_icmp(const char *str, uint16_t *typecode)
unsigned int i;
for (i = 0; i < ARRAY_SIZE(icmp_typecodes); i++)
- if (STRNEQ(icmp_typecodes[i].name, str, strlen(str))) {
+ if (STRNCASEQ(icmp_typecodes[i].name, str, strlen(str))) {
*typecode = (icmp_typecodes[i].type << 8) | icmp_typecodes[i].code;
return 0;
}