From f860ba5e4fa717fef213c152e004bd1660f18810 Mon Sep 17 00:00:00 2001 From: Peter Hessler Date: Sun, 15 Jan 2012 13:05:24 +0000 Subject: Make dhclient use the correct rdomain for all requests for leases, not just the first one. from Joel Knight OK krw@ --- sbin/dhclient/bpf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3