diff --git a/net/mdns-repeater/Makefile b/net/mdns-repeater/Makefile index 8fc5683f4a..c2d785a2de 100644 --- a/net/mdns-repeater/Makefile +++ b/net/mdns-repeater/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= mdns-repeater -PLUGIN_VERSION= 1.1 +PLUGIN_VERSION= 1.2 PLUGIN_REVISION= 1 PLUGIN_COMMENT= Proxy multicast DNS between networks PLUGIN_MAINTAINER= franz.fabian.94@gmail.com diff --git a/net/mdns-repeater/pkg-descr b/net/mdns-repeater/pkg-descr index a5ed7facd2..c02bb39a80 100644 --- a/net/mdns-repeater/pkg-descr +++ b/net/mdns-repeater/pkg-descr @@ -7,6 +7,11 @@ It can be used to bridge zeroconf devices to work properly across the two subnet Plugin Changelog ================ +1.2 + +* Blocklist support (contributed by Kodehyrden) + + 1.1 * CARP support (contributed by Markus Reiter) diff --git a/net/mdns-repeater/src/opnsense/mvc/app/controllers/OPNsense/MDNSRepeater/forms/general.xml b/net/mdns-repeater/src/opnsense/mvc/app/controllers/OPNsense/MDNSRepeater/forms/general.xml index 7a565757fe..e4487caec0 100644 --- a/net/mdns-repeater/src/opnsense/mvc/app/controllers/OPNsense/MDNSRepeater/forms/general.xml +++ b/net/mdns-repeater/src/opnsense/mvc/app/controllers/OPNsense/MDNSRepeater/forms/general.xml @@ -17,4 +17,10 @@ select_multiple At least 2 interfaces must be selected. The maximum number of supported interfaces by the daemon is 5. + + mdnsrepeater.blocklist + + text + Optionally to blacklist an entire subnet, (eg. 192.168.1.0/24) or individual addresses. Up to 16 subnets are supported and IPv4 subnets only. + diff --git a/net/mdns-repeater/src/opnsense/mvc/app/models/OPNsense/MDNSRepeater/MDNSRepeater.xml b/net/mdns-repeater/src/opnsense/mvc/app/models/OPNsense/MDNSRepeater/MDNSRepeater.xml index 85015e3d67..954db6d1a9 100644 --- a/net/mdns-repeater/src/opnsense/mvc/app/models/OPNsense/MDNSRepeater/MDNSRepeater.xml +++ b/net/mdns-repeater/src/opnsense/mvc/app/models/OPNsense/MDNSRepeater/MDNSRepeater.xml @@ -16,5 +16,15 @@ Y Y + + + N + Please enter one or more valid IPv4 networks or individual addresses in CIDR notation. + , + Y + Y + ipv4 + Y + diff --git a/net/mdns-repeater/src/opnsense/service/templates/OPNsense/MDNSRepeater/mdnsrepeater b/net/mdns-repeater/src/opnsense/service/templates/OPNsense/MDNSRepeater/mdnsrepeater index 7ca779ca55..dbb4f67762 100644 --- a/net/mdns-repeater/src/opnsense/service/templates/OPNsense/MDNSRepeater/mdnsrepeater +++ b/net/mdns-repeater/src/opnsense/service/templates/OPNsense/MDNSRepeater/mdnsrepeater @@ -10,6 +10,10 @@ required_files="/var/run/mdns-repeater.CARP_MASTER" {% do interface_list.append(physical_interface(i)) %} {% endfor %} mdns_repeater_interfaces="{{ interface_list | join(' ') }}" +{% if helpers.exists('OPNsense.MDNSRepeater.blocklist') and OPNsense.MDNSRepeater.blocklist != '' %} +{% set networkstobeblocked = "-b " + OPNsense.MDNSRepeater.blocklist.split(',') | join(' -b ') %} +mdns_repeater_blocklist="{{ networkstobeblocked }}" +{% endif %} {% else %} mdns_repeater_enable="NO" {% endif %}