Selaa lähdekoodia

base-files: remove IPv6 LL addr from interfaces before adding them to a bridge

SVN-Revision: 21659
Jo-Philipp Wich 15 vuotta sitten
vanhempi
sitoutus
fa244a1265
1 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 9 0
      package/base-files/files/lib/network/config.sh

+ 9 - 0
package/base-files/files/lib/network/config.sh

@@ -164,6 +164,15 @@ prepare_interface() {
 			local macaddr
 			local macaddr
 			config_get macaddr "$config" macaddr
 			config_get macaddr "$config" macaddr
 			[ -x /usr/sbin/brctl ] && {
 			[ -x /usr/sbin/brctl ] && {
+				# Remove IPv6 link local addr before adding the iface to the bridge
+				local llv6="$(ifconfig "$iface")"
+				case "$llv6" in
+					*fe80:*/64*)
+						llv6="${llv6#* fe80:}"
+						ifconfig "$iface" del "fe80:${llv6%% *}"
+					;;
+				esac
+
 				ifconfig "br-$config" 2>/dev/null >/dev/null && {
 				ifconfig "br-$config" 2>/dev/null >/dev/null && {
 					local newdevs devices
 					local newdevs devices
 					config_get devices "$config" device
 					config_get devices "$config" device