Update 10-setup-network.sh to allow DNSmasq to listen to container network (#550)

This commit is contained in:
sofakng 2023-06-11 03:42:22 -04:00 committed by GitHub
parent 466ab71140
commit e935c3fd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,3 +50,9 @@ ip route add "${IPV4_IP}/32" dev "br${VLAN}.mac"
if [ -n "${IPV6_IP}" ]; then
ip -6 route add "${IPV6_IP}/128" dev "br${VLAN}.mac"
fi
# Make DNSMasq listen to the container network for split horizon or conditional forwarding
if ! grep -qxF "interface=br${VLAN}.mac" /run/dnsmasq.conf.d/custom.conf; then
echo "interface=br${VLAN}.mac" >>/run/dnsmasq.conf.d/custom.conf
kill -9 "$(cat /run/dnsmasq.pid)"
fi