From 1f676b67451375df5e9e22ea5939b73d7d59b6fe Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 3 Feb 2011 19:12:43 +0000 Subject: Ticket #259. Actually kill dhlient when the interface type changes before going through apply changes otherwise the information would be lost and dhclient will remain running. --- usr/local/www/interfaces.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr/local/www/interfaces.php') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 98d449b..d1fa6f7 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -517,7 +517,12 @@ if ($_POST['apply']) { if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp"))) { $wancfg['if'] = $a_ppps[$pppid]['ports']; unset($a_ppps[$pppid]); + } else if ($wancfg['type'] == "dhcp") { + $pid = find_dhclient_process($realif); + if($pid) + posix_kill($pid, SIGTERM); } + } $ppp = array(); if ($wancfg['ipaddr'] != "ppp") -- cgit v1.1