updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ppp-alt / ppp-2.4.2-alt-pppd-noresolv.patch
blobb39b89e065457712f0ebd5534bb9e4ae772f8a3f
1 --- ppp-2.4.2/pppd/ipcp.c.vns 2004-01-13 06:59:06 +0300
2 +++ ppp-2.4.2/pppd/ipcp.c 2004-05-28 12:08:36 +0400
3 @@ -90,6 +90,7 @@
4 static int default_route_set[NUM_PPP]; /* Have set up a default route */
5 static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */
6 static bool usepeerdns; /* Ask peer for DNS addrs */
7 +static bool noresolvconf; /* Don't modify /etc/resolv.conf */
8 static int ipcp_is_up; /* have called np_up() */
9 static int ipcp_is_open; /* haven't called np_finished() */
10 static bool ask_for_local; /* request our address from peer */
11 @@ -206,6 +207,9 @@
12 "disable proxyarp option", OPT_ALIAS | OPT_A2CLR,
13 &ipcp_wantoptions[0].proxy_arp },
15 + { "noresolvconf", o_bool, &noresolvconf,
16 + "Don't modify /etc/resolv.conf when ask peer for DNS address(es)", 1 },
18 { "usepeerdns", o_bool, &usepeerdns,
19 "Ask peer for DNS address(es)", 1 },
21 @@ -1693,7 +1697,8 @@
22 script_setenv("DNS2", ip_ntoa(go->dnsaddr[1]), 0);
23 if (usepeerdns && (go->dnsaddr[0] || go->dnsaddr[1])) {
24 script_setenv("USEPEERDNS", "1", 0);
25 - create_resolv(go->dnsaddr[0], go->dnsaddr[1]);
26 + if (!noresolvconf)
27 + create_resolv(go->dnsaddr[0], go->dnsaddr[1]);