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 specified address #45

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

Conversation

wydrych
Copy link

@wydrych wydrych commented Nov 15, 2023

#44 reworked

verification

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

listening on implicit any

sflowtool

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

sflowtool -4

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

sflowtool -6

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

listening on explicit any

sflowtool -4 -b 0.0.0.0

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

sflowtool -6 -b ::

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

listening on localhost

sflowtool -4 -b 127.0.0.1

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

sflowtool -6 -b ::1

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

listening on arbitrary IP

sflowtool -4 -b 192.168.8.1

udp        0      0 192.168.8.1:6343        0.0.0.0:*                           1683018/src/sflowto

wrong AFI or malformed IP

$ src/sflowtool -4 -b 127.0.0.0.1
could not parse '127.0.0.0.1' as an IPv4 address
unable to open UDP read socket
$ src/sflowtool -6 -b 192.168.8.1
could not parse '192.168.8.1' as an IPv6 address
unable to open UDP read socket
$ src/sflowtool -6 -b bad
could not parse 'bad' as an IPv6 address
unable to open UDP read socket

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

1 participant