summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
554075a)
Call vnet_feature_next() for DHCP replies instead of using
default ip4-lookup. This allows DHCP replies to reach an
outside interface if it's configured as a DHCP client.
Change-Id: Icce1cd68b21256fcd6b1fad6792c06578b0e4e36
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
- if (proto0 != SNAT_PROTOCOL_UDP
+ if (PREDICT_TRUE (proto0 != SNAT_PROTOCOL_UDP
- != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client)))
+ != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
next0 = SNAT_OUT2IN_NEXT_DROP;
next0 = SNAT_OUT2IN_NEXT_DROP;
+ else
+ vnet_feature_next
+ (vnet_buffer (b0)->sw_if_index[VLIB_RX],
+ &next0, b0);
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
- if (proto1 != SNAT_PROTOCOL_UDP
+ if (PREDICT_TRUE (proto1 != SNAT_PROTOCOL_UDP
- != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client)))
+ != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
next1 = SNAT_OUT2IN_NEXT_DROP;
next1 = SNAT_OUT2IN_NEXT_DROP;
+ else
+ vnet_feature_next
+ (vnet_buffer (b1)->sw_if_index[VLIB_RX],
+ &next1, b1);
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
- if (proto0 != SNAT_PROTOCOL_UDP
+ if (PREDICT_TRUE (proto0 != SNAT_PROTOCOL_UDP
- != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client)))
+ != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
next0 = SNAT_OUT2IN_NEXT_DROP;
next0 = SNAT_OUT2IN_NEXT_DROP;
+ else
+ vnet_feature_next
+ (vnet_buffer (b0)->sw_if_index[VLIB_RX],
+ &next0, b0);
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
* Send DHCP packets to the ipv4 stack, or we won't
* be able to use dhcp client on the outside interface
*/
- if (proto0 != SNAT_PROTOCOL_UDP
+ if (PREDICT_TRUE (proto0 != SNAT_PROTOCOL_UDP
- != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client)))
+ != clib_host_to_net_u16(UDP_DST_PORT_dhcp_to_client))))
next0 = SNAT_OUT2IN_NEXT_DROP;
next0 = SNAT_OUT2IN_NEXT_DROP;
+ else
+ vnet_feature_next
+ (vnet_buffer (b0)->sw_if_index[VLIB_RX],
+ &next0, b0);