From 41550decd9d45cb01640b6f2a186c96786189cd4 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Fri, 2 Sep 2016 16:14:10 +0000 Subject: Move snmp options into struct relayd_config and delay start of the snmp subsystem until the configuration is done. OK benno@ claudio@ --- usr.sbin/relayd/pfe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr.sbin/relayd/pfe.c') diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c index 9c039c66b2a..012b49f24e8 100644 --- a/usr.sbin/relayd/pfe.c +++ b/usr.sbin/relayd/pfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfe.c,v 1.86 2016/09/02 14:45:51 reyk Exp $ */ +/* $OpenBSD: pfe.c,v 1.87 2016/09/02 16:14:09 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard @@ -62,8 +62,6 @@ pfe_init(struct privsep *ps, struct privsep_proc *p, void *arg) if (config_init(ps->ps_env) == -1) fatal("failed to initialize configuration"); - snmp_init(env, PROC_PARENT); - if (pledge("stdio recvfd unix pf", NULL) == -1) fatal("pledge"); @@ -207,6 +205,7 @@ pfe_dispatch_parent(int fd, struct privsep_proc *p, struct imsg *imsg) config_getcfg(env, imsg); init_filter(env, imsg->fd); init_tables(env); + snmp_init(env, PROC_PARENT); break; case IMSG_CTL_START: pfe_setup_events(); -- cgit v1.2.3