aboutsummaryrefslogtreecommitdiffstats
path: root/network-scripts/network-functions-ipv6
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2020-12-15 10:07:50 +0100
committerGitHub <noreply@github.com>2020-12-15 10:07:50 +0100
commite0c58b190523421347021029cd4516c7fc5db0bc (patch)
tree7db22e00645da1958f391af60c91ab2324b3cd3f /network-scripts/network-functions-ipv6
parent748122158d6b7007a49b38a78f22a749f1d2786d (diff)
downloadinitscripts-e0c58b190523421347021029cd4516c7fc5db0bc.tar
initscripts-e0c58b190523421347021029cd4516c7fc5db0bc.tar.gz
initscripts-e0c58b190523421347021029cd4516c7fc5db0bc.tar.bz2
initscripts-e0c58b190523421347021029cd4516c7fc5db0bc.tar.xz
initscripts-e0c58b190523421347021029cd4516c7fc5db0bc.zip
network: add option to keep the link down
Some interfaces like Open vSwitch bridges using the userspace datapath, needs the link to be kept down to avoid issues. Add a LINKSTATUS=[down|up] ifcfg parameter to add this functionality. If not specified, the link will default to up as before. Patch provided by Matteo Croce mcroce@redhat.com Resolves: #1555001
Diffstat (limited to 'network-scripts/network-functions-ipv6')
-rw-r--r--network-scripts/network-functions-ipv68
1 files changed, 5 insertions, 3 deletions
diff --git a/network-scripts/network-functions-ipv6 b/network-scripts/network-functions-ipv6
index 2f7b19b8..9a87a134 100644
--- a/network-scripts/network-functions-ipv6
+++ b/network-scripts/network-functions-ipv6
@@ -10,6 +10,8 @@
#
#
+# Source network-functions due to need of set_link_up()
+. ./network-functions
##### Test for IPv6 capabilities
# $1: (optional) testflag: currently supported: "testonly" (do not load a module)
@@ -108,7 +110,7 @@ ipv6_enable_autotunnel() {
true
else
# bring up basic tunnel device
- /sbin/ip link set sit0 up
+ set_link_up sit0
if ! ipv6_test_device_status sit0; then
net_log $"Tunnel device 'sit0' enabling didn't work" err $fn
@@ -159,7 +161,7 @@ ipv6_add_addr_on_device() {
net_log $"Device '$device' doesn't exist" err $fn
return 3
else
- /sbin/ip link set $device up
+ set_link_up $device
if ! ipv6_test_device_status $device; then
net_log $"Device '$device' enabling didn't work" err $fn
@@ -604,7 +606,7 @@ ipv6_add_tunnel_device() {
return 3
fi
- /sbin/ip link set $device up
+ set_link_up $device
if ! ipv6_test_device_status $device; then
net_log $"Tunnel device '$device' bringing up didn't work" err $fn