Re: SO_REUSEPORT and multicasting

From: Alan Cox
Date: Wed Jun 14 2006 - 10:33:54 EST


Ar Mer, 2006-06-14 am 07:26 -0700, ysgrifennodd Jason:
> > Have you bound to a multicast group in your program?
>
> If BSD supports it why can't Linux?

Linux follows the standards draft. SO_REUSEPORT is fairly obscure
BSDism.

> Yes. My code works great on HP-UX but does nothing on
> Linux.

That doesn't actually prove very much. Its very easy to write incorrect
code that only works on one system, especially when endian-ness gets
involved with network code.

In particular if writing portable code you must remember to join the
group. You must also remember that the various htons/htonl macros need
to be correctly used or your code will break on little-endian systems.

The default IP_MULTICAST_LOOP value is probably also worth overriding if
you are being fairly paranoid.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/