From bb4fa4c7f4d92300915c59ef5f53e7d65cde6e34 Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 2 Jul 2017 09:11:13 +0000 Subject: [PATCH] Unbreak tree by putting revised resolv_conf_priority() declaration in correct place and passing the invocation the correct parameters. Noticed by & initial diff from matthieu@ --- sbin/dhclient/dhcpd.h | 4 +++- sbin/dhclient/kroute.c | 3 +-- sbin/dhclient/privsep.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index a212fe0d874..26eb61483f2 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.201 2017/07/01 23:27:56 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.202 2017/07/02 09:11:13 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -250,3 +250,5 @@ void add_route(struct in_addr, struct in_addr, struct in_addr, struct in_addr, int, int); void flush_unpriv_ibuf(const char *); + +int resolv_conf_priority(int, int); diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index c1d56b8132e..8b912e8c719 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.101 2017/07/01 23:27:56 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.102 2017/07/02 09:11:13 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback @@ -77,7 +77,6 @@ int create_route_label(struct sockaddr_rtlabel *); int check_route_label(struct sockaddr_rtlabel *); void populate_rti_info(struct sockaddr **, struct rt_msghdr *); void delete_route(int, struct rt_msghdr *); -int resolv_conf_priority(int, int); #define ROUTE_LABEL_NONE 1 diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c index 99ec2b49000..09ffe76375f 100644 --- a/sbin/dhclient/privsep.c +++ b/sbin/dhclient/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.53 2017/07/01 23:27:56 krw Exp $ */ +/* $OpenBSD: privsep.c,v 1.54 2017/07/02 09:11:13 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -95,7 +95,7 @@ dispatch_imsg(struct interface_info *ifi, int ioctlfd, int routefd, case IMSG_WRITE_RESOLV_CONF: if (imsg.hdr.len <= IMSG_HEADER_SIZE) log_warnx("short IMSG_WRITE_RESOLV_CONF"); - else if (resolv_conf_priority(ifi->rdomain)) + else if (resolv_conf_priority(ifi->rdomain, routefd)) priv_write_resolv_conf(imsg.data, imsg.hdr.len - IMSG_HEADER_SIZE); break; -- 2.20.1