For future forwarding changes, it makes more sense for the tcp and udp listen functions to return socket fds, rather than just success / failure. Make the change, fixing bug 186 along the way. Link: https://bugs.passt.top/show_bug.cgi?id=186 Changes in v2: * Fix several typos in comments and commit messages * Drop the --no-bindtodevice option, I was convinced it wasn't useful enough * Change from -EACCES to -EAFNOSUPPORT error code David Gibson (2): tcp, udp, conf: Don't silently ignore listens on unsupported IP versions tcp, udp: Make {tcp,udp}_listen() return socket fds conf.c | 24 +++++++++++++++++------- tcp.c | 13 ++++--------- udp.c | 10 ++++------ 3 files changed, 25 insertions(+), 22 deletions(-) -- 2.52.0