Shell ngctl msg node: setopt ... bails with error

Hello!
I'm struggling with ngctl to enable SO_REUSEPORT on ksocket(inet/dgram/udp).

Node ID as absolutely correct, I can both bind and connect - but I can't setopt.

Bash:
# node: is of type ksocket inet/dgram/udp

# Works
ngctl msg node: bind inet/127.0.0.1:5000

# Works
ngctl msg node: connect inet/127.0.0.1:5001

# No idea how to correctly construct message for setsockopt()
#  Level is 0xFFFF (SOL_SOCKET)
#  Name is 0x200 (SO_REUSEPORT)
#  Value is 1 (enable)
ngctl -d msg node: setopt '{level=0xffff name=0x200 data=[1]}'

# ngctl: sendto(node:): No such file or directory
# ngctl: send msg: No such file or directory

How to correctly construct payload for setopt message? Error doesn't change regardless of addressing (relative, absolute, by id).
 
Ok, that did the trick. Thank you.
  • ng_ksocket manual is misguiding (it clearly states data= in setopt example)
  • error message is not helpful (even malformed argument would be more useful than No such file or directory)
I submitted a bug report at PR 259628. When I dig out from my #dayjob, I'll explore the possibility to fix the error message to something more helpful.
 
it looks like ENOENT is returned for a bad structure member/argument name, and its kind of hardwired in errno.h, strerror
at least the man page can be fixed
 
Back
Top