mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Switch to using std::ranges algorithms
This commit is contained in:
parent
b4cbda4e02
commit
72c79006ac
42 changed files with 90 additions and 93 deletions
|
@ -101,7 +101,7 @@ void UDPAnalyzer::DeliverPacket(Connection* c, double t, bool is_orig, int remai
|
|||
constexpr auto eth_len = 14;
|
||||
|
||||
if ( validate_checksum && len > ((int)sizeof(struct udphdr) + vxlan_len + eth_len) && (data[0] & 0x08) == 0x08 ) {
|
||||
if ( std::find(vxlan_ports.begin(), vxlan_ports.end(), ntohs(up->uh_dport)) != vxlan_ports.end() ) {
|
||||
if ( std::ranges::find(vxlan_ports, ntohs(up->uh_dport)) != vxlan_ports.end() ) {
|
||||
// Looks like VXLAN on a well-known port, so the checksum should be
|
||||
// transmitted as zero, and we should accept that. If not
|
||||
// transmitted as zero, then validating the checksum is optional.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue