-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
daemon: Allow to specify dev to inherit IP addr for LB devs #14259
Conversation
retest-net-next |
This commit introduces a new daemon flag --bpf-lb-dev-ip-addr-inherit which allows to specify a device name which IP addr is used for --devices in bpf_host.c (IP{4,6}_NODEPORT). This is useful for cases in which NIC ifaces w/o IP addrs are connected to a bridge which has an IP addr set, and IP{4,6}_NODEPORT addr should be of the bridge. Signed-off-by: Martynas Pumputis <m@lambda.lt>
caadb1f
to
6abb2eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think commit description should say IPV4_DIRECT_ROUTING
and/or IPV6_DIRECT_ROUTING
, no? Given we use these in particular for SNAT.
At least we pick them here based on nodePortIPv4Addrs():
if option.Config.EnableIPv4 {
nodePortIPv4Addrs := node.GetNodePortIPv4AddrsWithDevices()
ipv4 := byteorder.HostSliceToNetwork(nodePortIPv4Addrs[directRoutingIface], reflect.Uint32).(uint32)
cDefinesMap["IPV4_DIRECT_ROUTING"] = fmt.Sprintf("%d", ipv4)
}
Created an issue to remove |
test-me-please |
retest-net-next |
This commit introduces a new daemon flag
--bpf-lb-dev-ip-addr-inherit
which allows to specify a device name which IP addr is used for
--devices
in bpf_host.c (IP{4,6}_NODEPORT
).This is useful for cases in which NIC ifaces w/o IP addrs are connected
to a bridge which has an IP addr set, and
IP{4,6}_NODEPORT
addr shouldbe of the bridge.
Fix #14226