* Some old and probably unused code has been removed, notably the pppgetpass program and the passprompt plugin, and some of the files in the sample and scripts directories. * If a remote number has been set, it is available to scripts in the REMOTENUMBER environment variable. * Various other bug fixes and minor enhancements. - Obsoleted patches: * ppp-fix-bashisms.patch - Update to version 2.5.1: * Pppd can now measure and log the round-trip time (RTT) of LCP echo-requests and record them in a binary file structured as a circular buffer. Other programs or scripts can examine the file and provide real-time statistics on link latency. This is enabled by a new "lcp-rtt-file" option. * New scripts net-init, net-pre-up and net-down are executed in the process of bringing the network interface up and down. They provide additional, more deterministic ways for pppd to interact with the rest of the networking configuration. * New options have been added to allow the system administrator to set the location of various scripts and secrets files. * A new "noresolvconf" option tells pppd not to write the /etc/ppp/resolv.conf file; DNS server addresses, if obtained from the peer, are still passed to scripts in the environment. * Pppd will now create the directory for the TDB connection database if it doesn't already exist. - Obsoleted patches: * ppp-mkdir-run.patch * ppp-pidfiles.patch OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=86
75 lines
2.6 KiB
Diff
75 lines
2.6 KiB
Diff
Tue Jul 22 14:16:29 CEST 2008 - hvogel@suse.de
|
|
|
|
Move the resolv.conf written by pppd to /var/run [bnc#401648]
|
|
|
|
|
|
--- Changes-2.3.orig
|
|
+++ Changes-2.3
|
|
@@ -262,10 +262,10 @@ What was new in ppp-2.3.6.
|
|
|
|
* Added new option `usepeerdns', thanks to Nick Walker
|
|
<nickwalker@email.com>. If the peer supplies DNS addresses, these
|
|
- will be written to /etc/ppp/resolv.conf. The ip-up script can then
|
|
- be used to add these addresses to /etc/resolv.conf if desired (see
|
|
- the ip-up.local.add and ip-down.local.add files in the scripts
|
|
- directory).
|
|
+ will be written to /run/ppp_resolv.conf.$INTERFACE_NAME.
|
|
+ The ip-up script can then be used to add these addresses to
|
|
+ /etc/resolv.conf if desired (see the ip-up.local.add and
|
|
+ ip-down.local.add files in the scripts directory).
|
|
|
|
* The Solaris ppp driver should now work correctly on SMP systems.
|
|
|
|
--- pppd/ipcp.c.orig
|
|
+++ pppd/ipcp.c
|
|
@@ -2155,13 +2155,16 @@ static void
|
|
create_resolv(u_int32_t peerdns1, u_int32_t peerdns2)
|
|
{
|
|
FILE *f;
|
|
+ char rcfilename[PATH_MAX];
|
|
|
|
if (noresolvconf)
|
|
return;
|
|
|
|
- f = fopen(PPP_PATH_RESOLV, "w");
|
|
+ slprintf(rcfilename, sizeof(rcfilename), "%s.%s", PPP_PATH_RESOLV, ifname);
|
|
+
|
|
+ f = fopen(rcfilename, "w");
|
|
if (f == NULL) {
|
|
- error("Failed to create %s: %m", PPP_PATH_RESOLV);
|
|
+ error("Failed to create %s: %m", rcfilename);
|
|
return;
|
|
}
|
|
|
|
@@ -2172,7 +2175,7 @@ create_resolv(u_int32_t peerdns1, u_int3
|
|
fprintf(f, "nameserver %s\n", ip_ntoa(peerdns2));
|
|
|
|
if (ferror(f))
|
|
- error("Write failed to %s: %m", PPP_PATH_RESOLV);
|
|
+ error("Write failed to %s: %m", rcfilename);
|
|
|
|
fclose(f);
|
|
}
|
|
--- pppd/pathnames.h.orig
|
|
+++ pppd/pathnames.h
|
|
@@ -105,7 +105,7 @@
|
|
#define PPP_PATH_AUTHDOWN PPP_PATH_CONFDIR "/auth-down"
|
|
#define PPP_PATH_TTYOPT PPP_PATH_CONFDIR "/options."
|
|
#define PPP_PATH_PEERFILES PPP_PATH_CONFDIR "/peers/"
|
|
-#define PPP_PATH_RESOLV PPP_PATH_CONFDIR "/resolv.conf"
|
|
+#define PPP_PATH_RESOLV PPP_PATH_VARRUN "/ppp/resolv.conf"
|
|
|
|
#define PPP_PATH_NET_INIT PPP_PATH_CONFDIR "/net-init"
|
|
#define PPP_PATH_NET_PREUP PPP_PATH_CONFDIR "/net-pre-up"
|
|
--- pppd/pppd.8.orig
|
|
+++ pppd/pppd.8
|
|
@@ -1199,7 +1199,7 @@ Ask the peer for up to 2 DNS server addr
|
|
by the peer (if any) are passed to the /etc/ppp/ip\-up script in the
|
|
environment variables DNS1 and DNS2, and the environment variable
|
|
USEPEERDNS will be set to 1. In addition, pppd will create an
|
|
-/etc/ppp/resolv.conf file containing one or two nameserver lines with
|
|
+/run/ppp/resolv.conf.$INTERFACE file containing one or two nameserver lines with
|
|
the address(es) supplied by the peer (unless the \fInoresolvconf\fR
|
|
option is given).
|
|
.TP
|