Re: Forwarding broadcast traffic

Eric Lammerts
2001-03-03T20:22:18Z

On Sat, 3 Mar 2001, Jon Masters wrote:
> e.g. on desktop a broadcast udp packet (with a specified port) needs to
> go not only to itself and the router but also the "REST OF LAN" part
> too - and vice versa. Removing the router is not an option.

Write an application that creates 2 sockets listening on the same port
but different interfaces (using the SO_BINDTODEVICE socket option, see
the dhcp source for an example). Then forward any packet you receive
on one socket to the other side. If you need to keep the source ip
intact, you may have to use a raw socket for the sending part.

You could adapt a DHCP relay program to do this stuff instead of
writing it from scratch.

Eric

--
Eric Lammerts <eric@lammerts.org> | "An NT server can be run by
http://www.lammerts.org | an idiot, and usually is."