pppd: Import change from NetBSD

This avoids the use of gethostbyname() in case the "noipdefault" option
is given.  The gethostbyname() uses DNS by default.
This commit is contained in:
Sebastian Huber
2014-09-30 14:06:09 +02:00
parent 805360b8e5
commit 456eab7dc8
+1 -1
View File
@@ -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.