mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/ipv6-flow-label'
* origin/topic/jsiwek/ipv6-flow-label: Improve availability of IPv6 flow label in connection records. Closes #821.
This commit is contained in:
commit
7e961606cd
9 changed files with 192 additions and 9 deletions
74
testing/btest/Baseline/core.ipv6-flow-labels/output
Normal file
74
testing/btest/Baseline/core.ipv6-flow-labels/output
Normal file
|
@ -0,0 +1,74 @@
|
|||
new_connection: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49185/tcp, resp_h=2001:470:4867:99::21, resp_p=21/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49185/tcp, resp_h=2001:470:4867:99::21, resp_p=21/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_flow_label_changed(resp): [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49185/tcp, resp_h=2001:470:4867:99::21, resp_p=21/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 7407
|
||||
old_label 0
|
||||
new_label 7407
|
||||
new_connection: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49186/tcp, resp_h=2001:470:4867:99::21, resp_p=57086/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49186/tcp, resp_h=2001:470:4867:99::21, resp_p=57086/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_flow_label_changed(resp): [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49186/tcp, resp_h=2001:470:4867:99::21, resp_p=57086/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 176012
|
||||
old_label 0
|
||||
new_label 176012
|
||||
new_connection: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49187/tcp, resp_h=2001:470:4867:99::21, resp_p=57087/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49187/tcp, resp_h=2001:470:4867:99::21, resp_p=57087/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_flow_label_changed(resp): [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49187/tcp, resp_h=2001:470:4867:99::21, resp_p=57087/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 390927
|
||||
old_label 0
|
||||
new_label 390927
|
||||
new_connection: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49188/tcp, resp_h=2001:470:4867:99::21, resp_p=57088/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49188/tcp, resp_h=2001:470:4867:99::21, resp_p=57088/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 0
|
||||
connection_flow_label_changed(resp): [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49188/tcp, resp_h=2001:470:4867:99::21, resp_p=57088/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 364705
|
||||
old_label 0
|
||||
new_label 364705
|
||||
connection_state_remove: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49186/tcp, resp_h=2001:470:4867:99::21, resp_p=57086/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 176012
|
||||
connection_state_remove: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49187/tcp, resp_h=2001:470:4867:99::21, resp_p=57087/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 390927
|
||||
connection_state_remove: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49188/tcp, resp_h=2001:470:4867:99::21, resp_p=57088/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 364705
|
||||
new_connection: [orig_h=2001:470:4867:99::21, orig_p=55785/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49189/tcp]
|
||||
orig_flow 267377
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:4867:99::21, orig_p=55785/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49189/tcp]
|
||||
orig_flow 267377
|
||||
resp_flow 126027
|
||||
new_connection: [orig_h=2001:470:4867:99::21, orig_p=55647/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49190/tcp]
|
||||
orig_flow 355265
|
||||
resp_flow 0
|
||||
connection_established: [orig_h=2001:470:4867:99::21, orig_p=55647/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49190/tcp]
|
||||
orig_flow 355265
|
||||
resp_flow 126028
|
||||
connection_state_remove: [orig_h=2001:470:4867:99::21, orig_p=55785/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49189/tcp]
|
||||
orig_flow 267377
|
||||
resp_flow 126027
|
||||
connection_state_remove: [orig_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, orig_p=49185/tcp, resp_h=2001:470:4867:99::21, resp_p=21/tcp]
|
||||
orig_flow 0
|
||||
resp_flow 7407
|
||||
connection_state_remove: [orig_h=2001:470:4867:99::21, orig_p=55647/tcp, resp_h=2001:470:1f11:81f:c999:d94:aa7c:2e3e, resp_p=49190/tcp]
|
||||
orig_flow 355265
|
||||
resp_flow 126028
|
32
testing/btest/core/ipv6-flow-labels.test
Normal file
32
testing/btest/core/ipv6-flow-labels.test
Normal file
|
@ -0,0 +1,32 @@
|
|||
# @TEST-EXEC: bro -b -r $TRACES/ipv6-ftp.trace %INPUT >output
|
||||
# @TEST-EXEC: btest-diff output
|
||||
|
||||
function print_connection(c: connection, event_name: string)
|
||||
{
|
||||
print fmt("%s: %s", event_name, c$id);
|
||||
print fmt(" orig_flow %d", c$orig$flow_label);
|
||||
print fmt(" resp_flow %d", c$resp$flow_label);
|
||||
}
|
||||
|
||||
event new_connection(c: connection)
|
||||
{
|
||||
print_connection(c, "new_connection");
|
||||
}
|
||||
|
||||
event connection_established(c: connection)
|
||||
{
|
||||
print_connection(c, "connection_established");
|
||||
}
|
||||
|
||||
event connection_state_remove(c: connection)
|
||||
{
|
||||
print_connection(c, "connection_state_remove");
|
||||
}
|
||||
|
||||
event connection_flow_label_changed(c: connection, is_orig: bool,
|
||||
old_label: count, new_label: count)
|
||||
{
|
||||
print_connection(c, fmt("connection_flow_label_changed(%s)", is_orig ? "orig" : "resp"));
|
||||
print fmt(" old_label %d", old_label);
|
||||
print fmt(" new_label %d", new_label);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue