Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fib feature: Code mechanics to decouple dependency of feature on adj
[vpp.git]
/
src
/
vnet
/
ip
/
ip4_format.c
diff --git
a/src/vnet/ip/ip4_format.c
b/src/vnet/ip/ip4_format.c
index
0a2d7d2
..
eebd5ad
100644
(file)
--- a/
src/vnet/ip/ip4_format.c
+++ b/
src/vnet/ip/ip4_format.c
@@
-165,7
+165,7
@@
format_ip4_header (u8 * s, va_list * args)
/* Fragment offset. */
o = 8 * (f & 0x1fff);
/* Fragment offset. */
o = 8 * (f & 0x1fff);
- f ^=
o
;
+ f ^=
f & 0x1fff
;
if (o != 0)
s = format (s, " offset %d", o);
if (o != 0)
s = format (s, " offset %d", o);
@@
-178,6
+178,9
@@
format_ip4_header (u8 * s, va_list * args)
_(CONGESTION);
#undef _
}
_(CONGESTION);
#undef _
}
+ /* Fragment packet but not the first. */
+ if (o != 0)
+ return s;
}
/* Recurse into next protocol layer. */
}
/* Recurse into next protocol layer. */
@@
-213,7
+216,7
@@
unformat_ip4_header (unformat_input_t * input, va_list * args)
ip = p;
}
ip = p;
}
- memset (ip, 0, sizeof (ip[0]));
+
clib_
memset (ip, 0, sizeof (ip[0]));
ip->ip_version_and_header_length = IP4_VERSION_AND_HEADER_LENGTH_NO_OPTIONS;
if (!unformat (input, "%U: %U -> %U",
ip->ip_version_and_header_length = IP4_VERSION_AND_HEADER_LENGTH_NO_OPTIONS;
if (!unformat (input, "%U: %U -> %U",