[rtems commit] pppd: Import change from NetBSD

Sebastian Huber sebh at rtems.org
Tue Sep 30 11:58:24 UTC 2014


Module:    rtems
Branch:    master
Commit:    456eab7dc8cbb69e238e6095e298787b1c1d2058
Changeset: http://git.rtems.org/rtems/commit/?id=456eab7dc8cbb69e238e6095e298787b1c1d2058

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Sep 30 11:26:50 2014 +0200

pppd: Import change from NetBSD

This avoids the use of gethostbyname() in case the "noipdefault" option
is given.  The gethostbyname() uses DNS by default.

---

 cpukit/pppd/ipcp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpukit/pppd/ipcp.c b/cpukit/pppd/ipcp.c
index ae8f15b..fd23ddd 100644
--- a/cpukit/pppd/ipcp.c
+++ b/cpukit/pppd/ipcp.c
@@ -1294,7 +1294,7 @@ ip_check_options(void)
      * Default our local IP address based on our hostname.
      * If local IP address already given, don't bother.
      */
-    if (wo->ouraddr == 0) {
+    if (wo->ouraddr == 0 && !disable_defaultip) {
 	/*
 	 * Look up our hostname (possibly with domain name appended)
 	 * and take the first IP address as our local IP address.



More information about the vc mailing list