Unbreak tree by putting revised resolv_conf_priority() declaration in
authorkrw <krw@openbsd.org>
Sun, 2 Jul 2017 09:11:13 +0000 (09:11 +0000)
committerkrw <krw@openbsd.org>
Sun, 2 Jul 2017 09:11:13 +0000 (09:11 +0000)
correct place and passing the invocation the correct parameters.

Noticed by & initial diff from matthieu@

sbin/dhclient/dhcpd.h
sbin/dhclient/kroute.c
sbin/dhclient/privsep.c

index a212fe0..26eb614 100644 (file)
@@ -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 <henning@openbsd.org>
@@ -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);
index c1d56b8..8b912e8 100644 (file)
@@ -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 <krw@openbsd.org>
@@ -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
index 99ec2b4..09ffe76 100644 (file)
@@ -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 <henning@openbsd.org>
@@ -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;