summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat/out2in.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-07-21 03:46:03 -0700
committerMatus Fabian <matfabia@cisco.com>2017-07-21 03:46:47 -0700
commit161c59c75c667ce7a3c1d6173723831dc30e994c (patch)
tree8e7ed4f26a2e9120fde75401f3d738b546a037fe /src/plugins/snat/out2in.c
parentfaee17e8b866fe16ce706af31d1e9cbc6d06b961 (diff)
SNAT: in2out translation as an output feature hairpinning (VPP-913)
Change-Id: I3790739683c6090ffb2aefb4758bd4275856c09a Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/snat/out2in.c')
-rw-r--r--src/plugins/snat/out2in.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/snat/out2in.c b/src/plugins/snat/out2in.c
index cba42465e91..329d67dc3bf 100644
--- a/src/plugins/snat/out2in.c
+++ b/src/plugins/snat/out2in.c
@@ -818,7 +818,10 @@ snat_out2in_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
-
+
+ vnet_buffer (b0)->snat.flags = 0;
+ vnet_buffer (b1)->snat.flags = 0;
+
ip0 = vlib_buffer_get_current (b0);
udp0 = ip4_next_header (ip0);
tcp0 = (tcp_header_t *) udp0;
@@ -1131,6 +1134,8 @@ snat_out2in_node_fn (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
+ vnet_buffer (b0)->snat.flags = 0;
+
ip0 = vlib_buffer_get_current (b0);
udp0 = ip4_next_header (ip0);
tcp0 = (tcp_header_t *) udp0;