diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/dnsmasq.d/010-mesh-batman-adv.conf b/package/gluon-mesh-batman-adv/files/lib/gluon/dnsmasq.d/010-mesh-batman-adv.conf new file mode 120000 index 0000000000000000000000000000000000000000..f4b89cbeeaa39a4455cd71f3ff5071457e0d9c6b --- /dev/null +++ b/package/gluon-mesh-batman-adv/files/lib/gluon/dnsmasq.d/010-mesh-batman-adv.conf @@ -0,0 +1 @@ +/var/gluon/mesh-batman-adv/dnsmasq.conf \ No newline at end of file diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/invariant/011-mesh b/package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/invariant/011-mesh index 6398d2c336b1e204512ec0bbe9138e2a50b43cc1..5ce85c61ca37b515e2fced62a2aa1e03692f94f4 100755 --- a/package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/invariant/011-mesh +++ b/package/gluon-mesh-batman-adv/files/lib/gluon/upgrade/mesh-batman-adv/invariant/011-mesh @@ -26,6 +26,10 @@ uci_set firewall client output 'ACCEPT' uci_set firewall client forward 'REJECT' uci_commit firewall +uci_set dhcp '@dnsmasq[0]' boguspriv '0' +uci_set dhcp '@dnsmasq[0]' localise_queries '0' +uci_set dhcp '@dnsmasq[0]' rebind_protection '0' + uci_remove dhcp client uci_add dhcp dhcp client uci_set dhcp client interface 'client' diff --git a/package/gluon-mesh-batman-adv/generate/lib/gluon/odhcp6c.d/010-mesh-batman-adv b/package/gluon-mesh-batman-adv/generate/lib/gluon/odhcp6c.d/010-mesh-batman-adv new file mode 100755 index 0000000000000000000000000000000000000000..5f70252291828a8c2d535e139da3c380eee058df --- /dev/null +++ b/package/gluon-mesh-batman-adv/generate/lib/gluon/odhcp6c.d/010-mesh-batman-adv @@ -0,0 +1,21 @@ +#!/bin/sh + +[ "$INTERFACE" = 'client' ] || exit 0 + +mkdir -p /var/gluon/mesh-batman-adv + +for ns in $RDNSS $RA_DNS; do + for domain in @mesh_domains@; do + echo "server=/$domain/$ns" + done +done > /var/gluon/mesh-batman-adv/dnsmasq.conf.$$ + +if cmp -s /var/gluon/mesh-batman-adv/dnsmasq.conf.$$ /var/gluon/mesh-batman-adv/dnsmasq.conf; then + rm /var/gluon/mesh-batman-adv/dnsmasq.conf.$$ + exit 0 +fi + +lock /var/gluon/mesh-batman-adv/dnsmasq.conf.lock +mv -f /var/gluon/mesh-batman-adv/dnsmasq.conf.$$ /var/gluon/mesh-batman-adv/dnsmasq.conf +/etc/init.d/dnsmasq restart +lock -u /var/gluon/mesh-batman-adv/dnsmasq.conf.lock