On Mon, Sep 03, 2001 at 11:48:02PM -0700, Terry Lambert wrote:
>"Vladimir A. Jakovenko" wrote:
>>
>> Hello!
>>
>> According to UNPv1 SO_REUSEPORT on UDP sockets can be used to bind more than
>> one socket to the same port (even with same source ip address). But quick
>> look on /sys/netinet/udp_usrreq.c function udp_input() shows that this will
>> work as expected (data stream duplicate) only on multicast/broadcast local
>> addresses. Please pay attention to the following code fragment comments:
>
>[ ... ]
>
>> Is there still any real need in such backward compatibility? Can such
>> functionality be added (fixed) with possibility to switch it off using
>> sysctl or kernel-build option?
>>
>> I find such possibility realy useful at least for NetFlow data
>> processing and believe that it would be useful for many UDP-based
>> protocols.
>
>Bound UDP sockets have always been problematic; there's a lot
>of code out there that depnds on the historical behaviour for
>unicast, unfortunately, including a number of commercial
>applications that run on FreeBSD (e.g. Real Server).
>
>If you look at that code for any length of time, you will get
>to see it as an armpit: it's not a good place to stick your
>nose, and it tends to smell to high heaven. At my current
>job, I'm up to my elbows in it...
Terry, I clearly understand all your explanations. Yes, we are living in
real life and there is a lot of programms with bad design.
But all what I want is possibility to receive UDP packets with corresponding
dst IP and port by more than one process on a single host. This already works
for Broadcast and Multicast addresses. If I want to get same functionality for
unicast (without any kernel changes) I have to use UDP-proxy, which redirects
given datagrams to loopback broadcast address, where they can be received by
more that one process.
According to comment in udp_input() SO_REUSEPORT hack on unicast sockets could
be used in single process, right?
How possibility to get duplicate traffic on two UDP sockets, which was created
in _different_ processes with the same local address and port values, would
break existing applications?
--
Regards,
Vladimir.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message