mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Change ICMP ND length to a uint16
This commit is contained in:
parent
5f1ee35d31
commit
b5d11d1ace
4 changed files with 17 additions and 1 deletions
|
@ -764,7 +764,7 @@ VectorValPtr ICMP_Analyzer::BuildNDOptionsVal(int caplen, const u_char* data)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t type = *((const uint8_t*)data);
|
uint8_t type = *((const uint8_t*)data);
|
||||||
uint8_t length = *((const uint8_t*)(data + 1));
|
uint16_t length = *((const uint16_t*)(data + 1));
|
||||||
|
|
||||||
if ( length == 0 )
|
if ( length == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
dnssl len 32 payload 254
|
||||||
|
dnssl len 33 payload 262
|
BIN
testing/btest/Traces/icmp_nd_dnssl.trace
Normal file
BIN
testing/btest/Traces/icmp_nd_dnssl.trace
Normal file
Binary file not shown.
14
testing/btest/scripts/base/protocols/icmp/dnssl.zeek
Normal file
14
testing/btest/scripts/base/protocols/icmp/dnssl.zeek
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# @TEST-EXEC: zeek -b -C -r $TRACES/icmp_nd_dnssl.trace %INPUT
|
||||||
|
# @TEST-EXEC: btest-diff .stdout
|
||||||
|
|
||||||
|
@load base/protocols/conn
|
||||||
|
|
||||||
|
event icmp_router_advertisement(c: connection, icmp: icmp_conn, cur_hop_limit: count, managed: bool, other: bool, home_agent: bool,
|
||||||
|
pref: count, proxy: bool, rsv: count, router_lifetime: interval, reachable_time: interval,
|
||||||
|
retrans_timer: interval, options: icmp6_nd_options ){
|
||||||
|
for (i in options){
|
||||||
|
if(options[i]$otype==31){
|
||||||
|
print fmt("dnssl len %d payload %d",options[i]$len,|options[i]$payload|);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue