Comment 6 for bug 590925

Revision history for this message
Grondr (grondr) wrote :

Wait, what? Are you saying that nc -should- accept -p with -l? In other words, that "nc -l -p 1234" is the same thing as "nc -l 1234" in OpenBSD nc? If so, I very much agree with that sentiment!

But that wasn't what the manpage seemed to indicate -at all-. It goes out of its way, in several places, to claim that this isn't possible, which was why I assumed that they had incompatibly changed the meaning of -p such that it no longer made sense to use it with -l, and then Ubuntu had (knowingly) shipped a version of nc that no longer accepted args that previous versions had accepted. If that's not the case, and the two cases really -are- supposed to be equivalent, then yes, changing this will restore a huge amount of compatibility with the traditional nc, and I don't understand why OpenBSD went out of their way (in both the code and the manpage) to make this not work in the first place.

Since you say this is a bug, I'll change the status.

(And yes, Hobbit really does have a real name, but he almost never uses it.)

P.S. You say you don't know where I was going w/my comment about "broken" vs -l -p. I was simply trying to say that the current (bug? deliberate change?) to the behavior of -l -p made it look like nc simply couldn't be used as a listener at all, and that, when I wrote the report, I hadn't yet discovered that the manpage for the OpenBSD's version claimed that -l -p was simply incorrect usage (based on what looked like a non-upward-compatible change) that that's why I was so intemperate in my tone---until I found what looked like a deliberate change in semantics (which you now say is a bug---I agree!), it looked like the intended way to use nc as a listener had just somehow been entirely broken instead.