Swiss armyknife can't do what I want.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcat (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: netcat
Netcat falls short of it's self-proclaimed swiss armyknife status.
I want it to listen on a port and report any UDP packets recieved on that port.
However, after sending one UDP packet only packets from that single host/port
that sent the first packet are accepted. The code mentions:
/* I'm not completely clear on how this works -- BSD seems to make UDP
just magically work in a connect()ed context, but we'll undoubtedly run
into systems this deal doesn't work on. For now, we apparently have to
issue a connect() on our just-tickled socket so we can write() back.
Again, why doesn't it just get filled in and taken care of?!
This hack is anything but optimal. Basically, if you want your listener
to also be able to send data back, you need this connect() line, which
also has the side effect that now anything from a different source or even a
different port on the other end won't show up and will cause ICMP errors.
I guess that's what they meant by "connect".
Let's try to remember what the "U" is *really* for, eh? */
rr = connect (nnetfd, (SA *)remend, sizeof (SA));
So.... This "connect" is the one I want/need to have removed. I suggest making
a new option for this. (just removing this connect line will make ME happy today,
but others will probably depend on it being there...
Ubuntu-9.04 / 9.10
[v1.10-38]
description: | updated |
After a bit of trouble patching the source for Ubuntu I have now a patched source that indeed does what I want. Just that one line commented out....
If you want me to add a command switch, someone should suggest a useful letter. I'm not good at that sort of stuff. (-p for promiscuous is taken).