|
@ -81,10 +81,10 @@ do_connect() { |
|
|
[[ "$addr" != "$mask" ]] && proto_add_ipv6_address "$addr" "$mask" |
|
|
[[ "$addr" != "$mask" ]] && proto_add_ipv6_address "$addr" "$mask" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
DNSMASQ_FILE="/tmp/dnsmasq.d/openconnect.$TUNDEV" |
|
|
|
|
|
rm -f $DNSMASQ_FILE |
|
|
if [ -n "$CISCO_SPLIT_DNS" ] && [ -d "/tmp/dnsmasq.d/" ];then |
|
|
if [ -n "$CISCO_SPLIT_DNS" ] && [ -d "/tmp/dnsmasq.d/" ];then |
|
|
SDNS=`echo $CISCO_SPLIT_DNS|sed 's/,/\n/g'` |
|
|
SDNS=`echo $CISCO_SPLIT_DNS|sed 's/,/\n/g'` |
|
|
DNSMASQ_FILE="/tmp/dnsmasq.d/openconnect.$TUNDEV" |
|
|
|
|
|
rm -f $DNSMASQ_FILE |
|
|
|
|
|
echo "$SDNS" | while read i; do |
|
|
echo "$SDNS" | while read i; do |
|
|
if [ -n "$INTERNAL_IP4_DNS" ];then |
|
|
if [ -n "$INTERNAL_IP4_DNS" ];then |
|
|
for dns in "$INTERNAL_IP4_DNS";do |
|
|
for dns in "$INTERNAL_IP4_DNS";do |
|
@ -110,7 +110,19 @@ do_connect() { |
|
|
proto_add_dns_server "$dns" |
|
|
proto_add_dns_server "$dns" |
|
|
done |
|
|
done |
|
|
fi |
|
|
fi |
|
|
[ -n "$CISCO_DEF_DOMAIN" ] && proto_add_dns_search "$CISCO_DEF_DOMAIN" |
|
|
|
|
|
|
|
|
if [ -n "$CISCO_DEF_DOMAIN" ];then |
|
|
|
|
|
if [ -n "$INTERNAL_IP4_DNS" ];then |
|
|
|
|
|
for dns in "$INTERNAL_IP4_DNS";do |
|
|
|
|
|
echo "server=/$CISCO_DEF_DOMAIN/$dns" >> $DNSMASQ_FILE |
|
|
|
|
|
done |
|
|
|
|
|
fi |
|
|
|
|
|
if [ -n "$INTERNAL_IP6_DNS" ];then |
|
|
|
|
|
for dns in "$INTERNAL_IP6_DNS";do |
|
|
|
|
|
echo "server=/$CISCO_DEF_DOMAIN/$dns" >> $DNSMASQ_FILE |
|
|
|
|
|
done |
|
|
|
|
|
fi |
|
|
|
|
|
proto_add_dns_search "$CISCO_DEF_DOMAIN" |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ -n "$CISCO_SPLIT_INC" ]; then |
|
|
if [ -n "$CISCO_SPLIT_INC" ]; then |
|
|