aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-08-29 15:41:29 -0400
committerjim-p <jimp@pfsense.org>2012-08-29 15:42:11 -0400
commit2ea284dca898b7f8b13967a443130f0ee8592658 (patch)
tree428e35ab454bf556d8bedacd0edb7300a3cd1805 /config
parent0a8b30591971a6a84c20bbdbe911d99a6fa62bbd (diff)
downloadpfsense-packages-2ea284dca898b7f8b13967a443130f0ee8592658.tar.gz
pfsense-packages-2ea284dca898b7f8b13967a443130f0ee8592658.tar.bz2
pfsense-packages-2ea284dca898b7f8b13967a443130f0ee8592658.zip
Add options to Avahi to selectively disable IPv6 (and IPv4)
Diffstat (limited to 'config')
-rw-r--r--config/avahi/avahi.inc6
-rw-r--r--config/avahi/avahi.xml12
2 files changed, 16 insertions, 2 deletions
diff --git a/config/avahi/avahi.inc b/config/avahi/avahi.inc
index f848763d..7b093276 100644
--- a/config/avahi/avahi.inc
+++ b/config/avahi/avahi.inc
@@ -86,6 +86,8 @@ function avahi_write_config() {
$enable = $config['installedpackages']['avahi']['config'][0]['enable'];
$browsedomains = $config['installedpackages']['avahi']['config'][0]['browsedomains'];
$denyif = $config['installedpackages']['avahi']['config'][0]['denyinterfaces'];
+ $useipv4 = ($config['installedpackages']['avahi']['config'][0]['disable_ipv4']) ? "no" : "yes";
+ $useipv6 = ($config['installedpackages']['avahi']['config'][0]['disable_ipv6']) ? "no" : "yes";
// No supplied domains? Use the defaults.
if(!$browsedomains)
@@ -116,8 +118,8 @@ host-name={$hostname}
domain-name={$domain}
browse-domains="{$browsedomains}"
deny-interfaces={$denyinterfaces}
-use-ipv4=yes
-use-ipv6=yes
+use-ipv4={$useipv4}
+use-ipv6={$useipv6}
enable-dbus=no
#check-response-ttl=no
#use-iff-running=no
diff --git a/config/avahi/avahi.xml b/config/avahi/avahi.xml
index 339e9dec..ef229af1 100644
--- a/config/avahi/avahi.xml
+++ b/config/avahi/avahi.xml
@@ -68,6 +68,18 @@
<type>interfaces_selection</type>
<multiple>true</multiple>
</field>
+ <field>
+ <fielddescr>Disable IPv6</fielddescr>
+ <fieldname>disable_ipv6</fieldname>
+ <description>Disable IPv6 support in Avahi</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Disable IPv4</fielddescr>
+ <fieldname>disable_ipv4</fieldname>
+ <description>Disable IPv4 support in Avahi</description>
+ <type>checkbox</type>
+ </field>
</fields>
<additional_files_needed>
<prefix>/root/</prefix>