tools: remove setup_physical_bridge_port() function
PATCH 1/1 tools: remove setup_physical_bridge_port() function
Only the setup_virtual_bridge_port() function was used. As such merge that with _setup_bridge_port() and leave that as the remaining function.
---
Since the script originates with the Xen Project, I would like to draw attention to Debian bug #1067152:
https://bugs.debian.org/1067152
In different words, the issue is the vif#.# interfaces end up getting autogenerated IPv6 link-local addresses which they shouldn't have. This doesn't effect IPv6 connectivity for the front-end network devices.
--- tools/hotplug/Linux/vif-bridge | 2 +- tools/hotplug/Linux/vif-openvswitch | 2 +- tools/hotplug/Linux/xen-network-common.sh | 22 ++++++---------------- 3 files changed, 8 insertions(+), 18 deletions(-)
tools/hotplug/Linux/vif-bridge +1 -1
@@ -78,7 +78,7 @@ fi case "$command" in add|online) - setup_virtual_bridge_port "$dev" + setup_bridge_port "$dev" set_mtu "$bridge" "$dev" "$type_if" add_to_bridge "$bridge" "$dev" ;;
tools/hotplug/Linux/vif-openvswitch +1 -1
@@ -88,7 +88,7 @@ add_to_openvswitch () { case "$command" in add|online) check_tools - setup_virtual_bridge_port $dev + setup_bridge_port $dev add_to_openvswitch $dev ;;
tools/hotplug/Linux/xen-network-common.sh +6 -16
@@ -79,32 +79,22 @@ find_dhcpd_arg_file() } # configure interfaces which act as pure bridge ports: -_setup_bridge_port() { +setup_bridge_port() { local dev="$1" - local virtual="$2" # take interface down ... ip link set dev ${dev} down - if [ $virtual -ne 0 ] ; then - # Initialise a dummy MAC address. We choose the numerically - # largest non-broadcast address to prevent the address getting - # stolen by an Ethernet bridge for STP purposes. - # (FE:FF:FF:FF:FF:FF) - ip link set dev ${dev} address fe:ff:ff:ff:ff:ff || true - fi + # Initialise a dummy MAC address. We choose the numerically + # largest non-broadcast address to prevent the address getting + # stolen by an Ethernet bridge for STP purposes. + # (FE:FF:FF:FF:FF:FF) + ip link set dev ${dev} address fe:ff:ff:ff:ff:ff || true # ... and configure it ip address flush dev ${dev} } -setup_physical_bridge_port() { - _setup_bridge_port $1 0 -} -setup_virtual_bridge_port() { - _setup_bridge_port $1 1 -} - # Usage: create_bridge bridge create_bridge () { local bridge=$1
Signature · 5 lines
-- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | [email protected] PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
Quoted 4 lines · Elliott Mitchell
Only the
setup_virtual_bridge_port()function was used. As such merge that with_setup_bridge_port()and leave that as the remaining function.Signed-off-by Elliott Mitchell <[email protected]>
Do you mind if I add the following to the commit message?
The last user of setup_physical_bridge_port() was removed in 9fabe55939a8 ("tools/hotplug: Remove network-*").
With that:
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech