aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_frag.c
diff options
context:
space:
mode:
authorVijayabhaskar Katamreddy <vkatamre@cisco.com>2017-11-15 13:50:26 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-12-15 15:58:46 +0000
commitce07412a54f06900b377a7f4966f6a26e19b8f2b (patch)
tree860d792f497e71e09c899b13bd744512c43a9563 /src/vnet/ip/ip_frag.c
parent0e789423bb0d447c9d0ef62e1379d01f78939b8a (diff)
Fix icmp/udp/tcp punt/drop paths
Send packets to ip4/6_punt/drop nodes instead of error-drop/punt nodes dbarach: clean up an annoying checkstyle issue: indent 2.2.10 (OpenSUSE version) and indent 2.2.11 (Ubuntu / CentOS versions) had an artistic disagreement about ip_frag.c. Change-Id: I660bee28a064af9c6c70371363081e941d1c3a94 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/ip/ip_frag.c')
-rw-r--r--src/vnet/ip/ip_frag.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c
index ca062bfd5e8..2af697e96b6 100644
--- a/src/vnet/ip/ip_frag.c
+++ b/src/vnet/ip/ip_frag.c
@@ -90,8 +90,8 @@ ip4_frag_do_fragment (vlib_main_t * vm, u32 pi, u32 ** buffer,
ip_frag_id = ip4->fragment_id;
ip_frag_offset = ip4_get_fragment_offset (ip4);
more =
- ! !(ip4->flags_and_fragment_offset &
- clib_host_to_net_u16 (IP4_HEADER_FLAG_MORE_FRAGMENTS));
+ !(!(ip4->flags_and_fragment_offset &
+ clib_host_to_net_u16 (IP4_HEADER_FLAG_MORE_FRAGMENTS)));
}
else
{
@@ -239,10 +239,12 @@ ip4_frag (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
next0 = IP4_FRAG_NEXT_ICMP_ERROR;
}
else
- next0 =
- (error0 ==
- IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
- ip_frag.next_index : IP4_FRAG_NEXT_DROP;
+ {
+ /* *INDENT-OFF* */
+ next0 = (error0 == IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
+ ip_frag.next_index : IP4_FRAG_NEXT_DROP;
+ /* *INDENT-ON* */
+ }
if (error0 == IP_FRAG_ERROR_NONE)
{
@@ -482,10 +484,11 @@ ip6_frag (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
tr->next = vnet_buffer (p0)->ip_frag.next_index;
}
- next0 =
- (error0 ==
- IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
+ /* *INDENT-OFF* */
+ next0 = (error0 == IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
ip_frag.next_index : IP6_FRAG_NEXT_DROP;
+ /* *INDENT-ON* */
+
frag_sent += vec_len (buffer);
small_packets += (vec_len (buffer) == 1);
@@ -547,7 +550,7 @@ VLIB_REGISTER_NODE (ip4_frag_node) = {
[IP4_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
[IP4_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
[IP4_FRAG_NEXT_ICMP_ERROR] = "ip4-icmp-error",
- [IP4_FRAG_NEXT_DROP] = "error-drop"
+ [IP4_FRAG_NEXT_DROP] = "ip4-drop"
},
};
/* *INDENT-ON* */
@@ -567,7 +570,7 @@ VLIB_REGISTER_NODE (ip6_frag_node) = {
.next_nodes = {
[IP6_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
[IP6_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
- [IP6_FRAG_NEXT_DROP] = "error-drop"
+ [IP6_FRAG_NEXT_DROP] = "ip6-drop"
},
};
/* *INDENT-ON* */