diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index ebb2d7fae..6bd2b821c 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -1,7 +1,7 @@ + * Copyright (C) 2015-2023 Franco Fichtner * Copyright (C) 2004-2008 Scott Ullrich * Copyright (C) 2008-2009 Ermal Luçi * Copyright (C) 2005 Espen Johansen @@ -1310,7 +1310,9 @@ function interface_proxyarp_configure($interface = '') /* kill any running choparp, on restart "all" */ if (empty($interface)) { - killbyname('choparp'); /* XXX only kills one */ + foreach (glob('/var/run/choparp_*.pid') as $pidfile) { + killbypid($pidfile); + } } $paa = array(); diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 05f507f99..1bce582e5 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -32,8 +32,10 @@ require_once 'IPv6.inc'; +/* XXX only two callers left, better remove this unreliable function */ function killbyname($procname, $sig = 'TERM', $waitforit = true) { + /* pgrep -n only kills the newest matching process */ _killbypid(shell_safe('/bin/pgrep -anx %s', $procname), $sig, $waitforit); }