mirror of
https://github.com/unraid/webgui.git
synced 2026-01-26 03:29:08 -06:00
rc.docker: only flush global addresses (keep link addresses)
This commit is contained in:
@@ -438,7 +438,7 @@ docker_network_start(){
|
||||
if [[ $DOCKER_ALLOW_ACCESS == yes && -n $IPV4 ]]; then
|
||||
# create shim interface and copy parent IPv4 address to shim interface
|
||||
[[ -e $SYSTEM/$LINK ]] || run ip link add link $NETWORK name $LINK type $ATTACH mode $MODE
|
||||
run ip addr flush dev $LINK
|
||||
run ip addr flush dev $LINK scope global
|
||||
run ip -4 addr add $IPV4 dev $LINK metric 0
|
||||
# disable IPv6 on shim interface
|
||||
echo 1 >$CONF6/$LINK/disable_ipv6
|
||||
@@ -464,7 +464,7 @@ docker_network_start(){
|
||||
fi
|
||||
elif [[ $TYPE != wlan ]]; then
|
||||
if [[ $DOCKER_ALLOW_ACCESS == yes && -n $IPV4 ]]; then
|
||||
run ip addr flush dev $VHOST
|
||||
run ip addr flush dev $VHOST scope global
|
||||
# copy IPv4 address to vhost interface
|
||||
run ip -4 addr add $IPV4 dev $VHOST metric 0
|
||||
log "prepared network $VHOST for host access"
|
||||
@@ -472,7 +472,7 @@ docker_network_start(){
|
||||
VHOST=vhost${NETWORK//[^0-9.]/}
|
||||
if [[ -e $SYSTEM/$VHOST ]]; then
|
||||
# remove IP addresses of vhost
|
||||
run ip addr flush dev $VHOST
|
||||
run ip addr flush dev $VHOST scope global
|
||||
# remove routing of vhost
|
||||
run ip -4 route flush dev $VHOST
|
||||
run ip -6 route flush dev $VHOST
|
||||
|
||||
Reference in New Issue
Block a user