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

add option to listen on loopback only #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wydrych
Copy link

@wydrych wydrych commented Nov 14, 2023

scope

Use -O to listen on loopback only – with keeping AFI selection by -4 / -6.

I guess it would be more valuable to add option to define listening address, but for my use-case listening on any vs loopback is enough and I see this patch as a good start.

verification

I expect no behavior change if sflowtool is run w/o -O. Output of netstat -anpl | fgrep sflow is attached for verification.

listening on any

sflowtool

udp6       0      0 :::6343                 :::*                                1629540/src/sflowto 

sflowtool -4

udp        0      0 0.0.0.0:6343            0.0.0.0:*                           1629694/src/sflowto 

sflowtool -6

udp6       0      0 :::6343                 :::*                                1629769/src/sflowto 

listening on loopback only

sflowtool -O

udp6       0      0 ::1:6343                :::*                                1629842/src/sflowto 

sflowtool -4 -O (or -4O)

udp        0      0 127.0.0.1:6343          0.0.0.0:*                           1629864/src/sflowto 

sflowtool -6 -O (or -6O)

udp6       0      0 ::1:6343                :::*                                1629905/src/sflowto 

@sflow
Copy link
Owner

sflow commented Nov 14, 2023

I think specifying a bind address, or interface, might be the way to go.

@wydrych
Copy link
Author

wydrych commented Nov 20, 2023

I think specifying a bind address, or interface, might be the way to go.

The former hasn't taken too much time, see #45 :-) (And should you prefer #45, we can close #44 w/o merging.)

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.

None yet

2 participants