Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ipip: Tunnel flags controlling copying data to/from payload/encap
[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
..
786a01d
100644
(file)
--- a/
src/vnet/ip/ip4_format.c
+++ b/
src/vnet/ip/ip4_format.c
@@
-155,6
+155,10
@@
format_ip4_header (u8 * s, va_list * args)
s = format (s, " (should be 0x%04x)", clib_net_to_host_u16 (c));
}
s = format (s, " (should be 0x%04x)", clib_net_to_host_u16 (c));
}
+ 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
+169,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
+182,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
+220,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",