diff options
author | Corentin Henry <corentinhenry@gmail.com> | 2017-01-30 12:02:48 -0800 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-08 13:29:57 +0200 |
commit | 05fe36e53fe39c6b288e9ef9ccfe9c226f948aad (patch) | |
tree | 888ac935e6cbcd09e8a01251b876d388a2434f45 | |
parent | 8823b73bffed3087ac3cfa8ad84de5d9c8d3c184 (diff) | |
download | aports-05fe36e53fe39c6b288e9ef9ccfe9c226f948aad.tar.bz2 aports-05fe36e53fe39c6b288e9ef9ccfe9c226f948aad.tar.xz |
main/busybox-initscripts: udhcpc: act on IPv4 only
udhcpc works only with IPv4 addresses but the current
/usr/share/udhcpc/default.script script interferes with IPv6.
For example, when getting a new lease from an IPv4 address on a given
interface, all the addresses on this interfaces get flushed, including
IPv6. This issue has been reported to the busybox project:
https://bugs.busybox.net/show_bug.cgi?id=9621
This commit prevents udhcpc to act on IPv6 addresses.
-rw-r--r-- | main/busybox-initscripts/APKBUILD | 8 | ||||
-rw-r--r-- | main/busybox-initscripts/default.script | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD index f1f893f5f7..218522c8ad 100644 --- a/main/busybox-initscripts/APKBUILD +++ b/main/busybox-initscripts/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=busybox-initscripts pkgver=3.0 -pkgrel=8 +pkgrel=9 pkgdesc="Init scripts for busybox daemons" url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts" arch="noarch" @@ -75,7 +75,7 @@ ad1556961294e4aa2abca6be52138b7c dvbdev daf57f3d0372f825ddc05b00973e5afe usbdev 30b0c85956b6701caf55309a17e537f6 usbdisk_link 826d85313ca7a4a0205d63bd58b7d01f xvd_links -bf044c113e04dcb7ad3206e329ae8e78 default.script" +a53918e4deaabe97b47c3aea431ef960 default.script" sha256sums="c92c6f91d56de0e7ac7189a85c6bb0f054199acc2b18258f4c7e0939d352b8b0 acpid.initd 182bddd5097daf3995c4eceec38cf9ab758f271b3e65d6b0f8a67f1281c8de19 crond.initd 26b7af7288089e8462db062c0644c8a66855d6bd0eaa7edd2a3a43b3655c7da8 dnsd.initd @@ -100,7 +100,7 @@ ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de dvbdev dcb0c37590019bccb4c31a5372cbf7728eae6f1174d56bf0708d7504243a5fbb usbdev 4957f6991e0cb988b263b5276b582f1757deecad19cddebe3c615b381df9f858 usbdisk_link 86ed99205050a5dcca8a27c7e8658df8c55dc85ed810db0d64b51f7c63aa140e xvd_links -1454249a4e603fe1c657321486e62f433e54d7360f1743e0a71355d1e4dbe0f6 default.script" +f555b07c4934dd59c7ab0c71080d97491afd17b7222631a49ccba3c95c6eea91 default.script" sha512sums="dd548670114a92404b8e35fb915fdbe5994498b05b0a418583271c3dd72fb7800950e42c095c902a014eb198c046b8a346d43dccd8e7a158048ae33767c572ed acpid.initd c9d0fb0f8cc27d661d3b4e58c56eb598ca368890576e18ffffd42efdf68ba35537656be9be319b2e2818aa0152d3ca8611bece2433512fbfcd4eed7988765549 crond.initd 82c70082fa6e00c389982e16b0ef92f8f137941517a2b74de57150f4645d8b8b2a91abaa22d5aede8f7d08e0749ef14a07860cf16f96058b96f4246a6c39222a dnsd.initd @@ -125,4 +125,4 @@ ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d b2dcf0ded9264334d79fbbb05dd12d649dc3119a060db5893f0e8aeca2141323961c3ba4c822a0ffb00dba848742d5cb374dc77e776b57cecde352a3e8e30f8a usbdev 392c40d223bdff59a624bd67907c06cff9c1b5468c25c19e10dbc3cef3208275d93966e760f140d71a86cb36ec796ea08dbaa767b40c12e9326c3c72964b28a8 usbdisk_link 5db6fa8bbb2d891212187c598cd8703277b3fcb95b5dba6628f7128eb48cc7c1bf4c53885e9d870999c8c95d2fe9cd27609b523596dc553c31b6f72a452a0118 xvd_links -d6f5f073a77a3b96cc7449a9fa4115829707488f379c8b3cb7f33dcaca112eedb02ff255b99c3131840cd9916d79842b01ea66592b84221c5bd417d074dc4453 default.script" +9c0cbe4f1a74afe95d16e601759b93488da279f5f9a0b17077fb505c92b87439a94022cdd380f226bc5a7212dc917215bac724061b8221486a403e3c0f5ba957 default.script" diff --git a/main/busybox-initscripts/default.script b/main/busybox-initscripts/default.script index 2a8267f221..ff02cddfff 100644 --- a/main/busybox-initscripts/default.script +++ b/main/busybox-initscripts/default.script @@ -31,7 +31,7 @@ run_scripts() { } deconfig() { - ip addr flush dev $interface + ip -4 addr flush dev $interface } is_wifi() { @@ -42,7 +42,7 @@ if_index() { if [ -e /sys/class/net/$interface/ifindex ]; then cat /sys/class/net/$interface/ifindex else - ip link show dev $interface | head -n1 | cut -d: -f1 + ip -4 link show dev $interface | head -n1 | cut -d: -f1 fi } @@ -62,12 +62,12 @@ routes() { [ "$i" = "$interface" ] && return done local gw= num= - while ip route del default via dev $interface 2>/dev/null; do + while ip -4 route del default via dev $interface 2>/dev/null; do : done num=0 for gw in $router; do - ip route add 0.0.0.0/0 via $gw dev $interface \ + ip -4 route add 0.0.0.0/0 via $gw dev $interface \ metric $(( $num + ${IF_METRIC:-$(calc_metric)} )) num=$(( $num + 1 )) done @@ -96,21 +96,21 @@ resolvconf() { } bound() { - ip addr add $ip/$mask ${broadcast:+broadcast $broadcast} dev $interface - ip link set dev $interface up + ip -4 addr add $ip/$mask ${broadcast:+broadcast $broadcast} dev $interface + ip -4 link set dev $interface up routes resolvconf } renew() { - if ! ip addr show dev $interface | grep $ip/$mask; then - ip addr flush dev $interface - ip addr add $ip/$mask ${broadcast:+broadcast $broadcast} dev $interface + if ! ip -4 addr show dev $interface | grep $ip/$mask; then + ip -4 addr flush dev $interface + ip -4 addr add $ip/$mask ${broadcast:+broadcast $broadcast} dev $interface fi local i for i in $router; do - if ! ip route show | grep ^default | grep $i; then + if ! ip -4 route show | grep ^default | grep $i; then routes break fi |