mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
add a dns https test case
This commit is contained in:
parent
8f7f75fcb4
commit
ca4b181d35
4 changed files with 13 additions and 0 deletions
|
@ -1706,6 +1706,15 @@ bool DNS_Interpreter::ParseRR_SVCB(detail::DNS_MsgInfo* msg, const u_char*& data
|
|||
if ( ! name_end )
|
||||
return false;
|
||||
|
||||
// target name can be root - in this case the alternative endpoint is
|
||||
// qname itself. make sure that we print "." instead of an empty string
|
||||
if ( name_end - target_name == 0 )
|
||||
{
|
||||
target_name[0] = '.';
|
||||
target_name[1] = '\0';
|
||||
name_end = target_name+1;
|
||||
}
|
||||
|
||||
SVCB_DATA svcb_data = {
|
||||
.svc_priority = svc_priority,
|
||||
.target_name = new String(target_name, name_end - target_name, true),
|
||||
|
@ -1724,6 +1733,7 @@ bool DNS_Interpreter::ParseRR_SVCB(detail::DNS_MsgInfo* msg, const u_char*& data
|
|||
analyzer->EnqueueConnEvent(dns_HTTPS, analyzer->ConnVal(), msg->BuildHdrVal(),
|
||||
msg->BuildAnswerVal(), msg->BuildSVCB_Val(&svcb_data));
|
||||
break;
|
||||
default: break; // unreachable. for suppressing compiler warnings.
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue