3080f777f5
- Refresh and merge: 0133-Allow-multiple-configurations-per-network-interface-.patch 0145-40network-handle-ip-ifname-static-correctly.patch 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch - Delete 0134-Remove-bootdev-warning-bnc-881112.patch: - ip=ibft got deprecated, so workaround not necessary OBS-URL: https://build.opensuse.org/request/show/355392 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=246
70 lines
2.2 KiB
Diff
70 lines
2.2 KiB
Diff
From b4216546ff3254f2ca21c6b29c745e1bfd4956cc Mon Sep 17 00:00:00 2001
|
|
From: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
|
Date: Wed, 24 Sep 2014 18:14:37 +0200
|
|
Subject: network: Request DHCP lease instead of getting/applying the offer
|
|
|
|
- Request ipv6 lease in proper mode: auto when auto6+dhcp6 requested
|
|
otherwise managed mode
|
|
- wait for DAD results in case of ipv6
|
|
|
|
Signed-off-by: Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
|
---
|
|
modules.d/40network/ifup.sh | 20 ++++++++++++++++----
|
|
1 files changed, 16 insertions(+), 4 deletions(-)
|
|
|
|
Index: dracut-044/modules.d/40network/ifup.sh
|
|
===================================================================
|
|
--- dracut-044.orig/modules.d/40network/ifup.sh
|
|
+++ dracut-044/modules.d/40network/ifup.sh
|
|
@@ -186,9 +186,15 @@ do_dhcp() {
|
|
|
|
local dhclient=''
|
|
if [ "$1" = "-6" ] ; then
|
|
- dhclient="wickedd-dhcp6"
|
|
+ local ipv6_mode=''
|
|
+ if [ -f /tmp/net.$netif.auto6 ] ; then
|
|
+ ipv6_mode="auto"
|
|
+ else
|
|
+ ipv6_mode="managed"
|
|
+ fi
|
|
+ dhclient="wickedd-dhcp6 --test --test-mode $ipv6_mode"
|
|
else
|
|
- dhclient="wickedd-dhcp4"
|
|
+ dhclient="wickedd-dhcp4 --test"
|
|
fi
|
|
|
|
if ! iface_has_link $netif; then
|
|
@@ -201,10 +207,14 @@ do_dhcp() {
|
|
fi
|
|
fi
|
|
|
|
- $dhclient --test $netif > /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1}
|
|
+ $dhclient --test-format leaseinfo --test-output /tmp/leaseinfo.${netif}.dhcp.ipv${1:1:1} --test-request - $netif << EOF
|
|
+<request type="lease"/>
|
|
+EOF
|
|
dhcp_apply $1 || return $?
|
|
|
|
+ if [ "$1" = "-6" ] ; then
|
|
+ wait_for_ipv6_dad $netif
|
|
+ fi
|
|
- echo $netif > /tmp/setup_net_${netif}.ok
|
|
return 0
|
|
}
|
|
|
|
@@ -224,6 +234,7 @@ do_ipv6auto() {
|
|
echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding
|
|
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra
|
|
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects
|
|
+ echo 1 > /proc/sys/net/ipv6/conf/$netif/autoconf
|
|
linkup $netif
|
|
wait_for_ipv6_auto $netif
|
|
|
|
@@ -515,6 +526,7 @@ for p in $(getargs ip=); do
|
|
load_ipv6
|
|
do_dhcp -6 ;;
|
|
auto6)
|
|
+ echo $netif > /tmp/net.$netif.auto6
|
|
do_ipv6auto ;;
|
|
static)
|
|
do_ifcfg ;;
|