I've read that OS sends broadcast packets via the 1st interface with
IFF_BROADCAST and that you can set/clear this flag with
ifconfig [-]broadcast (without an address). But this doesn't work.
In my case packets to
255.255.255.255 are sent via the WAN interface and I want them to go to LAN. The WAN interface is
pppoe and has a
p-t-p, not broadcast address. The LAN interface has the default broadcast address
192.168.1.255, but changing it to
255.255.255.255 has no effect.
What seems to work is:
route add -host 255.255.255.255 dev br-lan
Then I don't understand what the
broadcast address of a network interface is for. Maybe to filter the received broadcast packets? I mean This line:
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0