Revision 32c392aa
Added by Ermal LUÇI about 14 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
860 | 860 |
false, |
861 | 861 |
$stop_time); |
862 | 862 |
} |
863 |
/* Delete client's ip entry from tables 3 and 4. */ |
|
864 |
mwexec("/sbin/ipfw table 1 delete {$dbent[2]}"); |
|
865 |
mwexec("/sbin/ipfw table 2 delete {$dbent[2]}"); |
|
866 |
|
|
867 |
/* Release the ruleno so it can be reallocated to new clients. */ |
|
868 |
captiveportal_free_ipfw_ruleno($dbent[1]); |
|
863 |
|
|
864 |
if (is_ipaddr($dbent[2])) { |
|
865 |
/* Delete client's ip entry from tables 3 and 4. */ |
|
866 |
mwexec("/sbin/ipfw table 1 delete {$dbent[2]}"); |
|
867 |
mwexec("/sbin/ipfw table 2 delete {$dbent[2]}"); |
|
868 |
/* XXX: Redundant?! Ensure all pf(4) states are killed. */ |
|
869 |
mwexec("pfctl -k {$dbent[2]}"); |
|
870 |
mwexec("pfctl -K {$dbent[2]}"); |
|
871 |
} |
|
869 | 872 |
|
870 | 873 |
/* |
871 | 874 |
* These are the pipe numbers we use to control traffic shaping for each logged in user via captive portal |
... | ... | |
876 | 879 |
mwexec("/sbin/ipfw pipe " . ($dbent[1]+20001) . " delete"); |
877 | 880 |
} |
878 | 881 |
|
879 |
/* XXX: Redundant?! Ensure all pf(4) states are killed. */ |
|
880 |
mwexec("pfctl -k {$dbent[2]}"); |
|
881 |
mwexec("pfctl -K {$dbent[2]}"); |
|
882 |
|
|
882 |
/* Release the ruleno so it can be reallocated to new clients. */ |
|
883 |
captiveportal_free_ipfw_ruleno($dbent[1]); |
|
883 | 884 |
} |
884 | 885 |
|
885 | 886 |
/* remove a single client by sessionid */ |
Also available in: Unified diff
Make sure we have an ip to kill sessions from.