mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Accepts addresses with no profix or no vlan in lua/admin/manage_pool_members.lua
This commit is contained in:
parent
52c316d214
commit
6fcbcdd036
5 changed files with 85 additions and 20 deletions
|
|
@ -105,11 +105,11 @@ local function delete_host_mysql_flows(interface_id, host_info)
|
|||
local q
|
||||
|
||||
if isIPv4(addr) then
|
||||
q = string.format("DELETE FROM %s WHERE (IP_SRC_ADDR = INET_ATON('%s') OR IP_DST_ADDR = INET_ATON('%s')) AND VLAN_ID = %u and INTERFACE_ID = %d",
|
||||
"flowsv4", addr, addr, vlan, interface_id)
|
||||
q = string.format("DELETE FROM %s WHERE (IP_SRC_ADDR = INET_ATON('%s') OR IP_DST_ADDR = INET_ATON('%s')) AND VLAN_ID = %u and INTERFACE_ID = %d",
|
||||
"flowsv4", addr, addr, vlan, interface_id)
|
||||
elseif isIPv6(addr) then
|
||||
q = string.format("DELETE FROM %s WHERE (IP_SRC_ADDR = '%s' OR IP_DST_ADDR = '%s') AND VLAN_ID = %u AND INTERFACE_ID = %d",
|
||||
"flowsv6", addr, addr, vlan, interface_id)
|
||||
q = string.format("DELETE FROM %s WHERE (IP_SRC_ADDR = '%s' OR IP_DST_ADDR = '%s') AND VLAN_ID = %u AND INTERFACE_ID = %d",
|
||||
"flowsv6", addr, addr, vlan, interface_id)
|
||||
end
|
||||
|
||||
if not dry_run and q then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue