fba84bc647
- 99base: Increase initqueue timeout in non systemd case (bnc#887402) * Add: 0127-99base-Increase-initqueue-timeout-in-non-systemd-cas.patch - 90lvm: Install dm-snapshot module (bnc#888530) * Add: 0128-90lvm-Install-dm-snapshot-module.patch - Revert commit 6ecab258710d158a7a6 and only do not wait for swap via parameter (bnc#882812) * Add: 0129-Revert-commit-6ecab258710d158a7a6-and-only-do-not-wa.patch - nfs: Always add all kernel modules for kdump (bnc#887906) * Add: 0130-nfs-Always-add-all-kernel-modules-for-kdump.patch - 40network: handle prefixed IP addresses correctly (bnc#880108) * Add: 0131-40network-handle-prefixed-IP-addresses-correctly.patch - 40network: fixup static network configuration * Add: 0132-40network-fixup-static-network-configuration.patch - Remove 70-persistent-net.rules * Add: 0133-Remove-70-persistent-net.rules.patch OBS-URL: https://build.opensuse.org/request/show/243695 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=176
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From fc03504435d8bf5d0a31b8c566c2e783fbb96ec6 Mon Sep 17 00:00:00 2001
|
|
From: Hannes Reinecke <hare@suse.de>
|
|
Date: Wed, 30 Jul 2014 10:28:27 +0200
|
|
Subject: 40network: handle prefixed IP addresses correctly
|
|
|
|
If an IP address is given with prefix length ifup should be
|
|
parsing that correctly. And we should assume a prefix length
|
|
of /64 for IPv6 resp /24 for IPv4 if none were given.
|
|
|
|
References: bnc#880108
|
|
|
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
---
|
|
modules.d/40network/ifup.sh | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
|
index e0bf035..0a485ec 100755
|
|
--- a/modules.d/40network/ifup.sh
|
|
+++ b/modules.d/40network/ifup.sh
|
|
@@ -224,11 +224,19 @@ do_static() {
|
|
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
|
|
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
|
|
[ -n "$mask" -a -z "$prefix" ] && prefix=$(mask_to_prefix $mask)
|
|
+ if [ "${ip##*/}" != "${ip}" ] ; then
|
|
+ prefix="${ip##*/}"
|
|
+ ip="${ip%/*}"
|
|
+ fi
|
|
if strglobin $ip '*:*:*'; then
|
|
+ # Always assume /64 prefix for IPv6
|
|
+ [ -z "$prefix" ] && prefix=64
|
|
# note no ip addr flush for ipv6
|
|
ip addr add $ip/$prefix ${srv:+peer $srv} dev $netif
|
|
wait_for_ipv6_dad $netif
|
|
else
|
|
+ # Assume /24 prefix for IPv4
|
|
+ [ -z "$prefix" ] && prefix=24
|
|
ip addr flush dev $netif
|
|
ip addr add $ip/$prefix ${srv:+peer $srv} brd + dev $netif
|
|
fi
|
|
--
|
|
1.8.4.5
|
|
|