Skip to content

Commit

Permalink
Fix failing VRL and docs tests for parse_dnstap
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Dec 30, 2024
1 parent c71c7c1 commit beff6ca
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 100 deletions.
192 changes: 96 additions & 96 deletions lib/dnstap-parser/src/vrl_functions/parse_dnstap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,108 +31,108 @@ impl Function for ParseDnstap {
fn examples(&self) -> &'static [Example] {
&[Example {
title: "Parse dnstap query message",
source: r#"parse_dnstap("ChVqYW1lcy1WaXJ0dWFsLU1hY2hpbmUSC0JJTkQgOS4xNi4zGgBy5wEIAxACGAEiEAAAAAAAAAAAAAAAAAAAAAAqECABBQJwlAAAAAAAAAAAADAw8+0CODVA7+zq9wVNMU3WNlI2kwIAAAABAAAAAAABCWZhY2Vib29rMQNjb20AAAEAAQAAKQIAAACAAAAMAAoACOxjCAG9zVgzWgUDY29tAGAAbQAAAAByZLM4AAAAAQAAAAAAAQJoNQdleGFtcGxlA2NvbQAABgABAAApBNABAUAAADkADwA1AAlubyBTRVAgbWF0Y2hpbmcgdGhlIERTIGZvdW5kIGZvciBkbnNzZWMtZmFpbGVkLm9yZy54AQ==")"#,
source: r#"parse_dnstap!("ChVqYW1lcy1WaXJ0dWFsLU1hY2hpbmUSC0JJTkQgOS4xNi4zGgBy5wEIAxACGAEiEAAAAAAAAAAAAAAAAAAAAAAqECABBQJwlAAAAAAAAAAAADAw8+0CODVA7+zq9wVNMU3WNlI2kwIAAAABAAAAAAABCWZhY2Vib29rMQNjb20AAAEAAQAAKQIAAACAAAAMAAoACOxjCAG9zVgzWgUDY29tAGAAbQAAAAByZLM4AAAAAQAAAAAAAQJoNQdleGFtcGxlA2NvbQAABgABAAApBNABAUAAADkADwA1AAlubyBTRVAgbWF0Y2hpbmcgdGhlIERTIGZvdW5kIGZvciBkbnNzZWMtZmFpbGVkLm9yZy54AQ==")"#,
result: Ok(indoc!(
r#"{
"dataType": "Message",
"dataTypeId": 1,
"extraInfo": "",
"messageType": "ResolverQuery",
"messageTypeId": 3,
"queryZone": "com.",
"requestData": {
"fullRcode": 0,
"header": {
"aa": false,
"ad": false,
"anCount": 0,
"arCount": 1,
"cd": false,
"id": 37634,
"nsCount": 0,
"opcode": 0,
"qdCount": 1,
"qr": 0,
"ra": false,
"rcode": 0,
"rd": false,
"tc": false,
},
"opt": {
"do": true,
"ednsVersion": 0,
"extendedRcode": 0,
"options": [
{
"optCode": 10,
"optName": "Cookie",
"optValue": "7GMIAb3NWDM=",
}
"dataType": "Message",
"dataTypeId": 1,
"extraInfo": "",
"messageType": "ResolverQuery",
"messageTypeId": 3,
"queryZone": "com.",
"requestData": {
"fullRcode": 0,
"header": {
"aa": false,
"ad": false,
"anCount": 0,
"arCount": 1,
"cd": false,
"id": 37634,
"nsCount": 0,
"opcode": 0,
"qdCount": 1,
"qr": 0,
"ra": false,
"rcode": 0,
"rd": false,
"tc": false
},
"opt": {
"do": true,
"ednsVersion": 0,
"extendedRcode": 0,
"options": [
{
"optCode": 10,
"optName": "Cookie",
"optValue": "7GMIAb3NWDM="
}
],
"udpPayloadSize": 512
},
"question": [
{
"class": "IN",
"domainName": "facebook1.com.",
"questionType": "A",
"questionTypeId": 1
}
],
"udpPayloadSize": 512,
},
"question": [
{
"class": "IN",
"domainName": "facebook1.com.",
"questionType": "A",
"questionTypeId": 1,
}
],
"rcodeName": "NoError",
},
"responseData": {
"fullRcode": 16,
"header": {
"aa": false,
"ad": false,
"anCount": 0,
"arCount": 1,
"cd": false,
"id": 45880,
"nsCount": 0,
"opcode": 0,
"qdCount": 1,
"qr": 0,
"ra": false,
"rcode": 16,
"rd": false,
"tc": false,
"rcodeName": "NoError"
},
"opt": {
"do": false,
"ednsVersion": 1,
"extendedRcode": 1,
"ede": [
{
"extraText": "no SEP matching the DS found for dnssec-failed.org.",
"infoCode": 9,
"purpose": "DNSKEY Missing",
}
"responseData": {
"fullRcode": 16,
"header": {
"aa": false,
"ad": false,
"anCount": 0,
"arCount": 1,
"cd": false,
"id": 45880,
"nsCount": 0,
"opcode": 0,
"qdCount": 1,
"qr": 0,
"ra": false,
"rcode": 16,
"rd": false,
"tc": false
},
"opt": {
"do": false,
"ednsVersion": 1,
"extendedRcode": 1,
"ede": [
{
"extraText": "no SEP matching the DS found for dnssec-failed.org.",
"infoCode": 9,
"purpose": "DNSKEY Missing"
}
],
"udpPayloadSize": 1232
},
"question": [
{
"class": "IN",
"domainName": "h5.example.com.",
"questionType": "SOA",
"questionTypeId": 6
}
],
"udpPayloadSize": 1232,
"rcodeName": "BADSIG"
},
"question": [
{
"class": "IN",
"domainName": "facebook1.com.",
"questionType": "A",
"questionTypeId": 1,
}
],
"rcodeName": "NoError",
},
"responseAddress": "2001:502:7094::30",
"responsePort": 53,
"serverId": "james-Virtual-Machine",
"serverVersion": "BIND 9.16.3",
"socketFamily": "INET6",
"socketProtocol": "UDP",
"sourceAddress": "::",
"sourcePort": 46835,
"time": 1_593_489_007_920_014_129i64,
"timePrecision": "ns",
"timestamp": "2020-06-30T03:50:07.920014129Z"
"responseAddress": "2001:502:7094::30",
"responsePort": 53,
"serverId": "james-Virtual-Machine",
"serverVersion": "BIND 9.16.3",
"socketFamily": "INET6",
"socketProtocol": "UDP",
"sourceAddress": "::",
"sourcePort": 46835,
"time": 1593489007920014129,
"timePrecision": "ns",
"timestamp": "2020-06-30T03:50:07.920014129Z"
}"#
)),
}]
Expand Down
8 changes: 4 additions & 4 deletions website/cue/reference/remap/functions/parse_dnstap.cue
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ remap: functions: parse_dnstap: {
"question": [
{
"class": "IN"
"domainName": "facebook1.com."
"questionType": "A"
"questionTypeId": 1
"domainName": "h5.example.com."
"questionType": "SOA"
"questionTypeId": 6
},
]
"rcodeName": "NoError"
"rcodeName": "BADSIG"
}
"responseAddress": "2001:502:7094::30"
"responsePort": 53
Expand Down

0 comments on commit beff6ca

Please sign in to comment.