-/* $OpenBSD: dhclient.c,v 1.457 2017/07/07 14:53:06 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.458 2017/07/07 15:39:30 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
continue;
}
- got_imsg_hup = dispatch_imsg(ifi, ioctlfd, routefd, priv_ibuf);
+ got_imsg_hup = dispatch_imsg(ifi->name, ifi->rdomain, ioctlfd,
+ routefd, priv_ibuf);
if (got_imsg_hup)
quit = SIGHUP;
}
-/* $OpenBSD: privsep.c,v 1.54 2017/07/02 09:11:13 krw Exp $ */
+/* $OpenBSD: privsep.c,v 1.55 2017/07/07 15:39:30 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
#include "privsep.h"
int
-dispatch_imsg(struct interface_info *ifi, int ioctlfd, int routefd,
+dispatch_imsg(char *name, int rdomain, int ioctlfd, int routefd,
struct imsgbuf *ibuf)
{
struct imsg imsg;
sizeof(struct imsg_delete_address))
log_warnx("bad IMSG_DELETE_ADDRESS");
else
- priv_delete_address(ifi->name, ioctlfd,
- imsg.data);
+ priv_delete_address(name, ioctlfd, imsg.data);
break;
case IMSG_ADD_ADDRESS:
sizeof(struct imsg_add_address))
log_warnx("bad IMSG_ADD_ADDRESS");
else
- priv_add_address(ifi->name, ioctlfd, imsg.data);
+ priv_add_address(name, ioctlfd, imsg.data);
break;
case IMSG_FLUSH_ROUTES:
if (imsg.hdr.len != IMSG_HEADER_SIZE)
log_warnx("bad IMSG_FLUSH_ROUTES");
else
- priv_flush_routes(ifi->name, routefd,
- ifi->rdomain);
+ priv_flush_routes(name, routefd, rdomain);
break;
case IMSG_ADD_ROUTE:
sizeof(struct imsg_add_route))
log_warnx("bad IMSG_ADD_ROUTE");
else
- priv_add_route(ifi->rdomain, imsg.data);
+ priv_add_route(rdomain, imsg.data);
break;
case IMSG_SET_INTERFACE_MTU:
sizeof(struct imsg_set_interface_mtu))
log_warnx("bad IMSG_SET_INTERFACE_MTU");
else
- priv_set_interface_mtu(ifi->name, ioctlfd,
+ priv_set_interface_mtu(name, ioctlfd,
imsg.data);
break;
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, routefd))
+ else if (resolv_conf_priority(rdomain, routefd))
priv_write_resolv_conf(imsg.data,
imsg.hdr.len - IMSG_HEADER_SIZE);
break;
-/* $OpenBSD: privsep.h,v 1.41 2017/07/01 23:27:56 krw Exp $ */
+/* $OpenBSD: privsep.h,v 1.42 2017/07/07 15:39:30 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
int mtu;
};
-int dispatch_imsg(struct interface_info *, int, int, struct imsgbuf *);
+int dispatch_imsg(char *, int, int, int, struct imsgbuf *);
void add_direct_route(struct in_addr, struct in_addr, struct in_addr);
void add_default_route(struct in_addr, struct in_addr);