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

yanic query: allow setting non default destination port #209

Open
herbetom opened this issue Jan 4, 2022 · 2 comments
Open

yanic query: allow setting non default destination port #209

herbetom opened this issue Jan 4, 2022 · 2 comments

Comments

@herbetom
Copy link

herbetom commented Jan 4, 2022

Currently it seems as if yanic query doesn't allow to set a destination port and instead alwas 1001 is beeing used.

For testing purposes it would be great if a option would be available to query devices on another port.

I only see a --port flag which can be used to change the source port.

@maurerle
Copy link
Contributor

In yanic query, we land here:

yanic/respond/collector.go

Lines 225 to 228 in 35e9253

func (coll *Collector) sendPacket(conn *net.UDPConn, destination net.IP) {
addr := net.UDPAddr{
IP: destination,
Port: PortDefault,

so we need to allow setting a port param to this function and the queryCmd for this to work

@genofire
Copy link
Member

thats correct, we need therefore a bypass of parameter ...

current i am to lazy for developing it, sry.
every component on freifunk use this port, so i will focus on more importent things ...

but i will review and merge it, if some else develop it.
i believe it is an good first issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants