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

addpeer uri://... (without uri=) adds the empty peer #1182

Open
klemensn opened this issue Oct 5, 2024 · 0 comments
Open

addpeer uri://... (without uri=) adds the empty peer #1182

klemensn opened this issue Oct 5, 2024 · 0 comments

Comments

@klemensn
Copy link
Contributor

klemensn commented Oct 5, 2024

I simply forgot using the keyword when adding a peer and it resulted in my node adding a stub peer:

# yggdrasil -autoconf >/dev/null &
# yggdrasilctl getpeers
URI	State	Dir	IP Address	Uptime	RTT	RX	TX	Pr	Last Error
# yggdrasilctl addpeer tcp://1.2.3.4:5678
# yggdrasilctl getpeers
URI	State	Dir	IP Address	Uptime	RTT	 RX 	 TX 	Pr	        Last Error
   	Down 	Out	          	0s    	-  	 0kb	 0kb	0 	2s ago: link schema unknown

Passing uri= seems easy to miss and adding other peers that way looks odd:

# yggdrasilctl addpeer tcp://7.8.9.0:1234
Admin socket returned an error: peer is already configured

You can remove it via the empty string, though:

# yggdrasilctl removepeer ''
# yggdrasilctl getpeers
URI	State	Dir	IP Address	Uptime	RTT	RX	TX	Pr	Last Error

This needs stricter input validation (before adding a peer).

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

No branches or pull requests

1 participant