Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ip: Use full reassembly for fragments in ip6-local
[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
6c31b42
..
c6639b2
100644
(file)
--- a/
src/vnet/ip/ip4_format.c
+++ b/
src/vnet/ip/ip4_format.c
@@
-150,11
+150,16
@@
format_ip4_header (u8 * s, va_list * args)
/* Check and report invalid checksums. */
{
/* Check and report invalid checksums. */
{
- u16 c = ip4_header_checksum (ip);
- if (c != ip->checksum)
- s = format (s, " (should be 0x%04x)", clib_net_to_host_u16 (c));
+ if (!ip4_header_checksum_is_valid (ip))
+ s =
+ format (s, " (should be 0x%04x)",
+ clib_net_to_host_u16 (ip4_header_checksum (ip)));
}
}
+ s = format (s, " dscp %U ecn %U",
+ format_ip_dscp, ip4_header_get_dscp (ip),
+ format_ip_ecn, ip4_header_get_ecn (ip));
+
{
u32 f = clib_net_to_host_u16 (ip->flags_and_fragment_offset);
u32 o;
{
u32 f = clib_net_to_host_u16 (ip->flags_and_fragment_offset);
u32 o;
@@
-165,7
+170,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);