In gdb I see it gets to read -s case 's': sflag = optarg; break;
It realizes no more options are there and then ends at } else if (argv[0] && argv[1]) { host = argv[0]; uport = &argv[1]; if (pflag || sflag) usage(1); And sflag is set, so it reports usage and exits. The particular check in this path of pflag/sflag didn't exist back then. I found this comes in via a patch debian/patches/misc-failures-and-features.patch That was in Debian and Ubuntu since late 2016 This patch was modified by: commit 2ebffb014c830e49f6fad600c59cc1b82fe356a4 Author: Guilhem Moulin <guil...@debian.org> Date: Sun Dec 3 22:58:11 2017 +0100 Allow usage of -s with -l for consistency with netcat-traditional. Since then this is also in Debian. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1767283 Title: nc doesn't support "-s IP" option To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netcat-openbsd/+bug/1767283/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs