summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2012-01-15 13:05:23 +0000
committerphessler <phessler@openbsd.org>2012-01-15 13:05:23 +0000
commit2863f70b05f8954cea6fc17dbe9b2d38cabe714f (patch)
tree7ae2363883e4043919396cfa66a4155d1b3ba594
parentWhen we only rotate a log file once a month, the "next rotate" output (diff)
downloadwireguard-openbsd-2863f70b05f8954cea6fc17dbe9b2d38cabe714f.tar.xz
wireguard-openbsd-2863f70b05f8954cea6fc17dbe9b2d38cabe714f.zip
Make dhclient use the correct rdomain for all requests for leases, not
just the first one. from Joel Knight OK krw@
-rw-r--r--sbin/dhclient/bpf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index 90e2326cd55..42e313a62d8 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.20 2007/01/08 02:51:13 krw Exp $ */
+/* $OpenBSD: bpf.c,v 1.21 2012/01/15 13:05:23 phessler Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -103,6 +103,10 @@ if_register_send(void)
if (setsockopt(sock, IPPROTO_IP, IP_HDRINCL, &on,
sizeof(on)) == -1)
error("setsockopt(IP_HDRINCL): %m");
+ if (setsockopt(sock, IPPROTO_IP, SO_RTABLE, &ifi->rdomain,
+ sizeof(ifi->rdomain)) == -1)
+ error("setsockopt(SO_RTABLE): %m");
+
ifi->ufdesc = sock;
}