* long/ulong iproute-git fix
@ 2008-07-30 14:34 Denys Fedoryshchenko
0 siblings, 0 replies; only message in thread
From: Denys Fedoryshchenko @ 2008-07-30 14:34 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 131 bytes --]
This patch fixes bug in Metadata ematch attributes parser
strtoul on error return ULONG_MAX, not LONG_MAX
Patch attached as file
[-- Attachment #2: iproute2-30jul2008-ulong.patch --]
[-- Type: text/x-diff, Size: 853 bytes --]
diff -Naur iproute2/tc/em_meta.c iproute2-patched/tc/em_meta.c
--- iproute2/tc/em_meta.c 2008-07-30 17:29:57.000000000 +0300
+++ iproute2-patched/tc/em_meta.c 2008-07-30 17:29:15.000000000 +0300
@@ -262,7 +262,7 @@
}
num = bstrtoul(arg);
- if (num != LONG_MAX) {
+ if (num != ULONG_MAX) {
obj->kind = TCF_META_TYPE_INT << 12;
obj->kind |= TCF_META_ID_VALUE;
*dst = (unsigned long) num;
@@ -320,7 +320,7 @@
a = bstr_next(a);
shift = bstrtoul(a);
- if (shift == LONG_MAX) {
+ if (shift == ULONG_MAX) {
PARSE_ERR(a, "meta: invalid shift, must " \
"be numeric");
return PARSE_FAILURE;
@@ -338,7 +338,7 @@
a = bstr_next(a);
mask = bstrtoul(a);
- if (mask == LONG_MAX) {
+ if (mask == ULONG_MAX) {
PARSE_ERR(a, "meta: invalid mask, must be " \
"numeric");
return PARSE_FAILURE;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-30 14:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 14:34 long/ulong iproute-git fix Denys Fedoryshchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).