summaryrefslogtreecommitdiffstats
path: root/if-bsd.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 /if-bsd.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 'if-bsd.c')
-rw-r--r--if-bsd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/if-bsd.c b/if-bsd.c
index 58c405f8..05a2d515 100644
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -73,6 +73,13 @@
static int r_fd = -1;
int
+if_init(_unused struct interface *iface)
+{
+ /* BSD promotes secondary address by default */
+ return 0;
+}
+
+int
init_sockets(void)
{
if ((socket_afnet = socket(AF_INET, SOCK_DGRAM, 0)) == -1)