Merge pull request #66 from vholer/debian

On Debian always use IPv4 if available, disable IPv6 autoconfiguration
5.0
Vlastimil Holer 8 years ago committed by GitHub
commit 8e9e0ccf6a

@ -155,6 +155,8 @@ gen_iface6_conf() {
iface $DEV inet6 static iface $DEV inet6 static
address $IPV6 address $IPV6
netmask 64 netmask 64
autoconf 0
accept_ra 0
EOT EOT
if [ -n "$MTU" ]; then if [ -n "$MTU" ]; then
@ -213,14 +215,13 @@ EOT
IPV6=$(get_iface_var "IPV6") IPV6=$(get_iface_var "IPV6")
[[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6") [[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6")
GATEWAY6=$(get_gateway6) GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue [ -z "${IP}${IPV6}" ] && continue
[ -z "${DEV}" ] && continue [ -z "${DEV}" ] && continue
echo "auto $DEV" echo "auto $DEV"
[[ -z $IPV6 || -n $CONTEXT_FORCE_IPV4 ]] && gen_iface_conf [[ -n $IP ]] && gen_iface_conf
[[ -n $IPV6 ]] && gen_iface6_conf [[ -n $IPV6 ]] && gen_iface6_conf
done done

@ -169,7 +169,6 @@ gen_network_configuration()
IPV6=$(get_iface_var "IPV6") IPV6=$(get_iface_var "IPV6")
[[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6") [[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6")
GATEWAY6=$(get_gateway6) GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue [ -z "${IP}${IPV6}" ] && continue
[ -z "${DEV}" ] && continue [ -z "${DEV}" ] && continue

Loading…
Cancel
Save