lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit 3b87afcea81b07d0dc57a5a783343cd7dc28b3b1
parent b70b5d0b5ea348dd5333c2ffea1cc4aa70758208
Author: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Date:   Wed, 25 Nov 2015 00:23:43 +0100

vpnc-script: don't attempt to resolve domains which match the local domain

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>

Diffstat:
Mnet/vpnc-scripts/files/vpnc-script | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/vpnc-scripts/files/vpnc-script b/net/vpnc-scripts/files/vpnc-script @@ -82,10 +82,14 @@ do_connect() { fi DNSMASQ_FILE="/tmp/dnsmasq.d/openconnect.$TUNDEV" + LOCAL_DOMAIN=$(uci get dhcp.@dnsmasq[0].domain) rm -f $DNSMASQ_FILE if [ -n "$CISCO_SPLIT_DNS" ] && [ -d "/tmp/dnsmasq.d/" ];then SDNS=`echo $CISCO_SPLIT_DNS|sed 's/,/\n/g'` echo "$SDNS" | while read i; do + if [ "$i" = "$LOCAL_DOMAIN" ];then + continue + fi if [ -n "$INTERNAL_IP4_DNS" ];then for dns in "$INTERNAL_IP4_DNS";do echo "server=/$i/$dns" >> $DNSMASQ_FILE @@ -110,7 +114,7 @@ do_connect() { proto_add_dns_server "$dns" done fi - if [ -n "$CISCO_DEF_DOMAIN" ];then + if [ -n "$CISCO_DEF_DOMAIN" ] && [ "$CISCO_DEF_DOMAIN" != "$LOCAL_DOMAIN" ];then if [ -n "$INTERNAL_IP4_DNS" ];then for dns in "$INTERNAL_IP4_DNS";do echo "server=/$CISCO_DEF_DOMAIN/$dns" >> $DNSMASQ_FILE