Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
nat: fix dhcp client on outside interface with output feature
[vpp.git]
/
src
/
plugins
/
nat
/
in2out.c
diff --git
a/src/plugins/nat/in2out.c
b/src/plugins/nat/in2out.c
index
8d6f124
..
7b71252
100755
(executable)
--- a/
src/plugins/nat/in2out.c
+++ b/
src/plugins/nat/in2out.c
@@
-1043,11
+1043,11
@@
snat_in2out_node_fn_inline (vlib_main_t * vm,
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
- ((b0->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED)
- && proto0 == SNAT_PROTOCOL_UDP
+ (proto0 == SNAT_PROTOCOL_UDP
&& (vnet_buffer (b0)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
&& (vnet_buffer (b0)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
- (UDP_DST_PORT_dhcp_to_server))))
+ (UDP_DST_PORT_dhcp_to_server))
+ && ip0->dst_address.as_u32 == 0xffffffff))
goto trace00;
}
else
goto trace00;
}
else
@@
-1251,11
+1251,11
@@
snat_in2out_node_fn_inline (vlib_main_t * vm,
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
- ((b1->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED)
- && proto1 == SNAT_PROTOCOL_UDP
+ (proto1 == SNAT_PROTOCOL_UDP
&& (vnet_buffer (b1)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
&& (vnet_buffer (b1)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
- (UDP_DST_PORT_dhcp_to_server))))
+ (UDP_DST_PORT_dhcp_to_server))
+ && ip1->dst_address.as_u32 == 0xffffffff))
goto trace01;
}
else
goto trace01;
}
else
@@
-1492,11
+1492,11
@@
snat_in2out_node_fn_inline (vlib_main_t * vm,
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
* be able to use dhcp client on the outside interface
*/
if (PREDICT_FALSE
- ((b0->flags & VNET_BUFFER_F_LOCALLY_ORIGINATED)
- && proto0 == SNAT_PROTOCOL_UDP
+ (proto0 == SNAT_PROTOCOL_UDP
&& (vnet_buffer (b0)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
&& (vnet_buffer (b0)->ip.reass.l4_dst_port ==
clib_host_to_net_u16
- (UDP_DST_PORT_dhcp_to_server))))
+ (UDP_DST_PORT_dhcp_to_server))
+ && ip0->dst_address.as_u32 == 0xffffffff))
goto trace0;
}
else
goto trace0;
}
else