-/* $OpenBSD: dhcpd.h,v 1.197 2017/06/28 14:35:43 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.198 2017/06/28 15:23:19 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
void add_route(struct in_addr, struct in_addr, struct in_addr, struct in_addr,
int, int);
-int resolv_conf_priority(struct interface_info *);
-
void flush_unpriv_ibuf(const char *);
-/* $OpenBSD: kroute.c,v 1.96 2017/06/28 14:35:43 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.97 2017/06/28 15:23:19 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
int check_route_label(struct sockaddr_rtlabel *);
void populate_rti_info(struct sockaddr **, struct rt_msghdr *);
void delete_route(struct interface_info *, int, struct rt_msghdr *);
+int resolv_conf_priority(int);
+
#define ROUTE_LABEL_NONE 1
#define ROUTE_LABEL_NOT_DHCLIENT 2
ssize_t n;
int fd;
- if (!resolv_conf_priority(ifi))
+ if (!resolv_conf_priority(ifi->rdomain))
return;
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC,
* suppy the contents of the resolv.conf file.
*/
int
-resolv_conf_priority(struct interface_info *ifi)
+resolv_conf_priority(int rdomain)
{
struct iovec iov[3];
struct {
m_rtmsg.m_rtm.rtm_msglen = sizeof(m_rtmsg.m_rtm);
m_rtmsg.m_rtm.rtm_flags = RTF_STATIC | RTF_GATEWAY | RTF_UP;
m_rtmsg.m_rtm.rtm_seq = seq = arc4random();
- m_rtmsg.m_rtm.rtm_tableid = ifi->rdomain;
+ m_rtmsg.m_rtm.rtm_tableid = rdomain;
iov[iovcnt].iov_base = &m_rtmsg.m_rtm;
iov[iovcnt++].iov_len = sizeof(m_rtmsg.m_rtm);