From 39e8956d056b6b3cb886cdc2ff7eae8b07b53fcc Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 22 Jun 2020 13:40:00 +0200 Subject: Properly hook up igmp with announce --- main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 86681e8..f0cc399 100644 --- a/main.c +++ b/main.c @@ -501,11 +501,11 @@ cfg_apply() CAPNG_DROP_SUPP_GRP | CAPNG_CLEAR_BOUNDING)) die("capng_change_id failed"); } else { - if (capng_apply(CAPNG_SELECT_BOTH)) { - capng_clear(CAPNG_SELECT_BOTH); - if (capng_apply(CAPNG_SELECT_BOTH)) - die("capng_apply failed"); - } + /* + * This can fail if any of the caps are lacking, but it'll + * be re-checked later. + */ + capng_apply(CAPNG_SELECT_BOTH); setgroups(0, NULL); } @@ -596,7 +596,8 @@ main(int argc, char **argv) announce_init(); - announce_start(); + if (!cfg->igmp) + announce_start(0); idle_init(); -- cgit v1.2.3