mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
More code cleanup
This commit is contained in:
parent
6eb9f63e17
commit
9d1e51a91e
3 changed files with 12 additions and 11 deletions
|
@ -67,6 +67,7 @@ void ICMP_Analyzer::DeliverPacket(int len, const u_char* data,
|
|||
|
||||
default:
|
||||
reporter->InternalError("unexpected IP proto in ICMP analyzer");
|
||||
break;
|
||||
}
|
||||
|
||||
if ( chksum != 0xffff )
|
||||
|
@ -122,7 +123,8 @@ void ICMP_Analyzer::NextICMP4(double t, const struct icmp* icmpp, int len, int c
|
|||
break;
|
||||
|
||||
default:
|
||||
ICMPEvent(icmp_sent, icmpp, len, 0); break;
|
||||
ICMPEvent(icmp_sent, icmpp, len, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,6 +259,7 @@ TransportProto ICMP_Analyzer::GetContextProtocol(const IP_Hdr* ip_hdr, uint32* s
|
|||
|
||||
default:
|
||||
*src_port = *dst_port = ntohs(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return proto;
|
||||
|
@ -350,7 +353,6 @@ RecordVal* ICMP_Analyzer::ExtractICMP6Context(int len, const u_char*& data)
|
|||
src_addr = dst_addr = 0;
|
||||
src_port = dst_port = 0;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ip_len = ip_hdr->TotalLen();
|
||||
|
@ -394,7 +396,6 @@ RecordVal* ICMP_Analyzer::ExtractICMP6Context(int len, const u_char*& data)
|
|||
return iprec;
|
||||
}
|
||||
|
||||
|
||||
bool ICMP_Analyzer::IsReuse(double /* t */, const u_char* /* pkt */)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -122,7 +122,7 @@ int icmp6_checksum(const struct icmp* icmpp, const struct ip6_hdr* ip6, int len)
|
|||
|
||||
if ( len % 2 == 1 )
|
||||
// Add in pad byte.
|
||||
sum += htons(((const u_char*) icmpp)[len - 1] << 8);
|
||||
sum = htons(((const u_char*) icmpp)[len - 1] << 8);
|
||||
else
|
||||
sum = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue