mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Mask ports before inserting them into the map
This commit is contained in:
parent
a26e98f170
commit
5996520cc7
1 changed files with 4 additions and 3 deletions
|
@ -3972,10 +3972,11 @@ const PortValPtr& ValManager::Port(uint32_t port_num, TransportProto port_type)
|
||||||
port_num = 0;
|
port_num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ports.find(port_num) == ports.end() )
|
uint32_t port_masked = PortVal::Mask(port_num, port_type);
|
||||||
ports[port_num] = IntrusivePtr{AdoptRef{}, new PortVal(PortVal::Mask(port_num, port_type))};
|
if ( ports.find(port_masked) == ports.end() )
|
||||||
|
ports[port_masked] = IntrusivePtr{AdoptRef{}, new PortVal(PortVal::Mask(port_num, port_type))};
|
||||||
|
|
||||||
return ports[port_num];
|
return ports[port_masked];
|
||||||
}
|
}
|
||||||
|
|
||||||
const PortValPtr& ValManager::Port(uint32_t port_num)
|
const PortValPtr& ValManager::Port(uint32_t port_num)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue