Description: Fetch split DNS information from Cisco servers Cisco servers can optionally include a list of domain names that are configured using split DNS. . Request that list, and then export it to the vpnc-script Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/vpnc/+bug/954747 Author: Evan Broder Index: vpnc-0.5.3r512/vpnc.c =================================================================== --- vpnc-0.5.3r512.orig/vpnc.c 2012-03-13 23:21:45.000000000 -0700 +++ vpnc-0.5.3r512/vpnc.c 2012-03-13 23:37:09.495911698 -0700 @@ -1086,6 +1086,18 @@ } break; + case ISAKMP_MODECFG_ATTRIB_CISCO_SPLIT_DNS: + if (a->af != isakmp_attr_lots) { + reject = ISAKMP_N_ATTRIBUTES_NOT_SUPPORTED; + break; + } + strbuf = xallocc(a->u.lots.length + 1); + memcpy(strbuf, a->u.lots.data, a->u.lots.length); + addenv("CISCO_SPLIT_DNS", strbuf); + free(strbuf); + DEBUG(2, printf("Split DNS: %s\n", a->u.lots.data)); + break; + case ISAKMP_MODECFG_ATTRIB_CISCO_SAVE_PW: DEBUG(2, printf("got save password setting: %d\n", a->u.attr_16)); break; @@ -2433,6 +2445,7 @@ a->u.lots.data = xallocc(a->u.lots.length); memcpy(a->u.lots.data, uts.nodename, a->u.lots.length); + a = new_isakmp_attribute(ISAKMP_MODECFG_ATTRIB_CISCO_SPLIT_DNS, a); a = new_isakmp_attribute(ISAKMP_MODECFG_ATTRIB_CISCO_SPLIT_INC, a); a = new_isakmp_attribute(ISAKMP_MODECFG_ATTRIB_CISCO_SAVE_PW, a); Index: vpnc-0.5.3r512/vpnc-script =================================================================== --- vpnc-0.5.3r512.orig/vpnc-script 2012-03-13 23:21:45.000000000 -0700 +++ vpnc-0.5.3r512/vpnc-script 2012-03-13 23:21:45.000000000 -0700 @@ -15,6 +15,7 @@ #* INTERNAL_IP6_DNS -- IPv6 list of dns servers #* CISCO_DEF_DOMAIN -- default domain name #* CISCO_BANNER -- banner from server +#* CISCO_SPLIT_DNS -- comma-separated list of domain names with split DNS #* CISCO_SPLIT_INC -- number of networks in split-network-list #* CISCO_SPLIT_INC_%d_ADDR -- network address #* CISCO_SPLIT_INC_%d_MASK -- subnet mask (for example: 255.255.255.0)