summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-05-17 10:58:23 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-05-17 10:58:23 +0200
commitfe5f0d6fe5f30b0211d8078060147b0764abe6a8 (patch)
treed9aba68ac6d4d332536bf5d70572449b5effdeef
parent032dfba32c67ba59161a0856e8bc819fceefd1e0 (diff)
downloadnetctl-fe5f0d6fe5f30b0211d8078060147b0764abe6a8.tar.gz
netctl-fe5f0d6fe5f30b0211d8078060147b0764abe6a8.tar.xz
Restrict dhcpcd to IPv4
By default, dhcpcd requests leases for both versions of IPv6. In the past, dhcpcd did not support IPv6, so this commits restores old behavior.
-rw-r--r--src/lib/ip4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ip b/src/lib/ip
index 14ed727..8dd2d63 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -30,7 +30,7 @@ ip_set() {
rm -f "/run/dhcpcd-$Interface".{pid,cache}
# If using own dns, tell dhcpcd to NOT replace resolv.conf
[[ $DNS ]] && DhcpcdOptions+=" -C resolv.conf"
- do_debug dhcpcd -qL -t "${TimeoutDHCP:-10}" $DhcpcdOptions "$Interface" 2>&1 | report_debug "$(cat)"
+ do_debug dhcpcd -4qL -t "${TimeoutDHCP:-10}" $DhcpcdOptions "$Interface" 2>&1 | report_debug "$(cat)"
# The first array value of PIPESTATUS is the exit status of dhcpcd
if (( PIPESTATUS != 0 )); then
report_error "DHCP IP lease attempt failed on interface '$Interface'"
@@ -39,7 +39,7 @@ ip_set() {
;;
dhclient)
rm -f "/run/dhclient-${Interface}.pid"
- if ! do_debug dhclient -q -e "TIMEOUT=${TimeoutDHCP:-10}" -pf "/run/dhclient-$Interface.pid" $DhclientOptions "$Interface"; then
+ if ! do_debug dhclient -4 -q -e "TIMEOUT=${TimeoutDHCP:-10}" -pf "/run/dhclient-$Interface.pid" $DhclientOptions "$Interface"; then
report_error "DHCP IP lease attempt failed on interface '$Interface'"
return 1
fi