You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bridge: bind ip for aardvark-dns in unmanaged mode if gateway ip is not on the host
Find the Universe scope IPv4 addresses of the bridge with the modified dump_addresses() function.
This function works for all interfaces, not just bridges.
If the dns is enabled and the bridge mode is unmanaged, then the bind IP of aardvark-dns is changed to the IP addresses of the bridge instead of the gateway. If there are no IP address on the bridge then we just fail with a clear error that the user must disable dns (--disable-dns) when creating the network.
Signed-off-by: Shivang K Raghuvanshi <[email protected]>
returnErr(NetavarkError::msg(format!("bridge '{}' in unmanaged mode has no universe scope IP addresses, but aardvark-dns requires at least one universe scope address to bind to. Please add an universe scope IP address or disable DNS for this network (--disable-dns).", data.bridge_interface_name)));
// If interface's LinkID is supplied, then only the ip addresses of that specific interface is returned. Otherwise all ip addresses of all interfaces are returned
assert_json ".error""bridge 'brtest0' in unmanaged mode has no universe scope IP addresses, but aardvark-dns requires at least one universe scope address to bind to. Please add an universe scope IP address or disable DNS for this network (--disable-dns)."
57
+
}
58
+
59
+
@test bridge - unmanaged mode with aardvark-dns bridge ip {
60
+
run_in_host_netns ip link add brtest0 type bridge
61
+
run_in_host_netns ip link set brtest0 up
62
+
run_in_host_netns ip -j --details link show brtest0
63
+
link_info="$output"
64
+
assert_json "$link_info"'.[].flags[] | select(.=="UP")' == "UP""Host bridge interface is up"
65
+
66
+
run_in_host_netns ip addr add 10.88.0.1/16 dev brtest0
0 commit comments