gluon-mesh-batman-adv: add DNS support
This commit is contained in:
		
							parent
							
								
									1ceb38ac26
								
							
						
					
					
						commit
						e57e88ee6c
					
				| @ -0,0 +1 @@ | |||||||
|  | /var/gluon/mesh-batman-adv/dnsmasq.conf | ||||||
| @ -26,6 +26,10 @@ uci_set firewall client output 'ACCEPT' | |||||||
| uci_set firewall client forward 'REJECT' | uci_set firewall client forward 'REJECT' | ||||||
| uci_commit firewall | 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_remove dhcp client | ||||||
| uci_add dhcp dhcp client | uci_add dhcp dhcp client | ||||||
| uci_set dhcp client interface 'client' | uci_set dhcp client interface 'client' | ||||||
|  | |||||||
| @ -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 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user