summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2010-02-26 20:37:30 +0000
committerRoy Marples <roy@marples.name>2010-02-26 20:37:30 +0000
commit255e14dab144a3f6cb1910d9ea164afa9ff98220 (patch)
tree9d12e0f60af10ceca6bbc1979353a4481a40b72a /net.c
parent716f28888275611c14c492f6f4d2aaab24f59a8f (diff)
downloaddhcpcd-255e14dab144a3f6cb1910d9ea164afa9ff98220.tar.xz
Enable net.ipv4.conf.$iface.promote_secondaries on Linux so that
we keep the subnet when changing addresses on the same subnet.
Diffstat (limited to 'net.c')
-rw-r--r--net.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net.c b/net.c
index b55a7108..20edd0e7 100644
--- a/net.c
+++ b/net.c
@@ -449,6 +449,14 @@ discover_interfaces(int argc, char * const *argv)
"%s: unknown hardware family", p);
}
}
+
+ /* Handle any platform init for the interface */
+ if (if_init(ifp) == -1) {
+ syslog(LOG_ERR, "%s: if_init: %m", p);
+ free_interface(ifp);
+ continue;
+ }
+
if (ifl)
ifl->next = ifp;
else