Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
MTU: IP fragmentation added to ip4-rewrite and ip6-rewrite
[vpp.git]
/
src
/
vnet
/
ip
/
ip_frag.c
diff --git
a/src/vnet/ip/ip_frag.c
b/src/vnet/ip/ip_frag.c
index
fba25ff
..
1207ec5
100644
(file)
--- a/
src/vnet/ip/ip_frag.c
+++ b/
src/vnet/ip/ip_frag.c
@@
-85,6
+85,12
@@
ip4_frag_do_fragment (vlib_main_t * vm, u32 pi, u32 ** buffer,
return;
}
return;
}
+ if (p->flags & VLIB_BUFFER_NEXT_PRESENT)
+ {
+ *error = IP_FRAG_ERROR_MALFORMED;
+ return;
+ }
+
if (ip4_is_fragment (ip4))
{
ip_frag_id = ip4->fragment_id;
if (ip4_is_fragment (ip4))
{
ip_frag_id = ip4->fragment_id;
@@
-342,6
+348,12
@@
ip6_frag_do_fragment (vlib_main_t * vm, u32 pi, u32 ** buffer,
return;
}
return;
}
+ if (p->flags & VLIB_BUFFER_NEXT_PRESENT)
+ {
+ *error = IP_FRAG_ERROR_MALFORMED;
+ return;
+ }
+
u8 has_more;
u16 initial_offset;
if (*next_header == IP_PROTOCOL_IPV6_FRAGMENTATION)
u8 has_more;
u16 initial_offset;
if (*next_header == IP_PROTOCOL_IPV6_FRAGMENTATION)