Skip to content

Commit

Permalink
bpf: Set DIRECT_ROUTING_DEV* in routed mode
Browse files Browse the repository at this point in the history
This commits drop the check for the mode if the NodePort BPF is enabled,
which allows DIRECT_ROUTING_DEV* to be set in the "routed" mode
(--enable-endpoint-routes=true). Previously, the NodePort BPF was broken
with --enable-endpoint-routes=true.

Fix: c5bcce4 ("datapath: Use direct routing iface for fwding NodePort requests")
Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and borkmann committed May 8, 2020
1 parent e82c444 commit f7d6c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bpf/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ if [ "$MODE" = "direct" ] || [ "$MODE" = "ipvlan" ] || [ "$MODE" = "routed" ] ||

NP_COPTS=""

if [ "$MODE" = "direct" ] && [ "$NODE_PORT" = "true" ] ; then
if [ "$NODE_PORT" = "true" ] ; then
# First device from the list is used for direct routing between nodes
DIRECT_ROUTING_DEV=$(echo "${NATIVE_DEVS}" | cut -d\; -f1)
DIRECT_ROUTING_DEV_IDX=$(cat /sys/class/net/${DIRECT_ROUTING_DEV}/ifindex)
Expand Down

0 comments on commit f7d6c8a

Please sign in to comment.