Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Make sure that the interface selector is set on args.Prepare() #289

Conversation

els0r
Copy link
Owner

@els0r els0r commented Mar 30, 2024

The side-effect before was that it wasn't set, leading to the interface attribute not being present in the output when >1 interfaces were part of a query.

Also:

  • instrument each per-interface processing with a span

Closes #288

The side-effect before was that it wasn't set, leading to the interface
attribute not being present in the output when >1 interfaces were part of
a query
@els0r els0r linked an issue Mar 30, 2024 that may be closed by this pull request
@els0r els0r marked this pull request as ready for review March 30, 2024 03:13
@els0r
Copy link
Owner Author

els0r commented Mar 30, 2024

Tested functionality with

goquery -i mvpn0,eth0 -f -5m sip,dip,dport -n 25

                                                     packets   packets             bytes      bytes
    iface              sip              dip  dport        in       out      %         in        out      %
     eth0      10.236.2.56    10.236.130.23    443  466.00    650.00     5.03   48.88 kB  483.48 kB   1.84
     eth0      10.236.2.56    10.236.146.23    443  304.00    428.00     3.30   31.81 kB  316.60 kB   1.20
    mvpn0       44.0.105.8        44.9.2.92     22   33.00     23.00     0.25    1.75 kB    6.74 kB   0.03
    mvpn0       44.0.104.8        44.9.2.92     22   33.00     23.00     0.25    1.75 kB    6.74 kB   0.03

Copy link
Collaborator

@fako1024 fako1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small nitpicks, nice catch!

pkg/goDB/engine/query.go Outdated Show resolved Hide resolved
pkg/query/args.go Show resolved Hide resolved
@els0r els0r merged commit 859cfee into main Apr 5, 2024
5 checks passed
@els0r els0r deleted the 288-the-iface-attribute-is-not-added-when-more-than-one-interface-is-selected branch April 5, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The iface attribute is not added when more than one interface is selected
2 participants