diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-12-06 11:39:29 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-12-06 11:39:29 -0200 |
commit | 77a341a458d604287f46180db1facbdb540cd139 (patch) | |
tree | 369ac305a311b752aa96fbc327729b75e3f2bd73 /etc/inc/util.inc | |
parent | 09e14acf5b7b0fcb4f0404c0474a6a268c4bf60e (diff) | |
download | pfsense-77a341a458d604287f46180db1facbdb540cd139.zip pfsense-77a341a458d604287f46180db1facbdb540cd139.tar.gz |
Add a knob to prefer IPv4 over IPv6, it fixes #2833
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r-- | etc/inc/util.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 6e91eb6..69fcbf5 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -2064,4 +2064,14 @@ function get_current_theme() { return $theme; } +/* Define what is preferred, IPv4 or IPv6 */ +function prefer_ipv4_or_ipv6() { + global $config; + + if (isset($config['system']['prefer_ipv4'])) + mwexec("/etc/rc.d/ip6addrctl prefer_ipv4"); + else + mwexec("/etc/rc.d/ip6addrctl prefer_ipv6"); +} + ?> |