Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
dracut.608
0131-40network-handle-prefixed-IP-addresses-cor...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0131-40network-handle-prefixed-IP-addresses-correctly.patch of Package dracut.608
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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor