summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2012-01-15 13:05:24 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2012-01-15 13:05:24 +0000
commitf860ba5e4fa717fef213c152e004bd1660f18810 (patch)
tree9e251d67bc9ed6edfbc34e0f5b28cb84803a7830 /sbin
parentcda6d851065e813a9068492d70071d13baeab7c2 (diff)
Make dhclient use the correct rdomain for all requests for leases, not
just the first one. from Joel Knight OK krw@
Diffstat (limited to 'sbin')
-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;
}