-/* $OpenBSD: control.c,v 1.7 2017/01/08 23:04:42 krw Exp $ */
+/* $OpenBSD: control.c,v 1.8 2018/08/05 08:10:35 mestre Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
return (0);
}
-void
-control_cleanup(char *path)
-{
- if (path == NULL)
- return;
- event_del(&control_state.ev);
- event_del(&control_state.evt);
- unlink(path);
-}
-
/* ARGSUSED */
static void
control_accept(int listenfd, short event, void *bula)
-/* $OpenBSD: control.h,v 1.3 2016/09/02 16:44:33 renato Exp $ */
+/* $OpenBSD: control.h,v 1.4 2018/08/05 08:10:35 mestre Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
int control_init(char *);
int control_listen(void);
-void control_cleanup(char *);
int control_imsg_relay(struct imsg *);
#endif /* _CONTROL_H_ */
-/* $OpenBSD: eigrpd.c,v 1.23 2018/08/02 06:43:31 mestre Exp $ */
+/* $OpenBSD: eigrpd.c,v 1.24 2018/08/05 08:10:35 mestre Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
else if (eflag)
eigrpe(debug, global.cmd_opts & EIGRPD_OPT_VERBOSE, sockname);
- global.csock = sockname;
-
mib[0] = CTL_NET;
mib[1] = PF_INET;
mib[2] = IPPROTO_IP;
eigrpd_conf->rdomain) == -1)
fatalx("kr_init failed");
- if (pledge("stdio rpath cpath inet sendfd", NULL) == -1)
+ if (pledge("stdio rpath inet sendfd", NULL) == -1)
fatal("pledge");
event_dispatch();
msgbuf_clear(&iev_rde->ibuf.w);
close(iev_rde->ibuf.fd);
- control_cleanup(global.csock);
kr_shutdown();
config_clear(eigrpd_conf);
-/* $OpenBSD: eigrpd.h,v 1.24 2018/02/08 00:16:54 claudio Exp $ */
+/* $OpenBSD: eigrpd.h,v 1.25 2018/08/05 08:10:35 mestre Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
int eigrp_socket_v6;
struct in_addr mcast_addr_v4;
struct in6_addr mcast_addr_v6;
- char *csock;
};
extern struct eigrpd_global global;
-/* $OpenBSD: eigrpe.c,v 1.35 2018/08/02 06:28:35 mestre Exp $ */
+/* $OpenBSD: eigrpe.c,v 1.36 2018/08/05 08:10:35 mestre Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
log_verbose(verbose);
/* create eigrpd control socket outside chroot */
- global.csock = sockname;
- if (control_init(global.csock) == -1)
+ if (control_init(sockname) == -1)
fatalx("control socket setup failed");
if (inet_pton(AF_INET, AllEIGRPRouters_v4, &global.mcast_addr_v4) != 1)