mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Fix dropping of broadcast packets in some situations.
...by which I mean make it drop the packets depending on the socket options of the receiving socket.
This commit is contained in:
parent
4694ce8850
commit
098cb76ff4
20
src/router.c
20
src/router.c
@ -243,6 +243,26 @@ static void _deliver_packet(
|
||||
continue;
|
||||
}
|
||||
|
||||
if((dest_net == BCAST_NET || dest_node == BCAST_NODE)
|
||||
&& !(sock->flags & IPX_RECV_BCAST))
|
||||
{
|
||||
/* Packet destination address includes a broadcast part
|
||||
* and this socket has explicitly disabled reception of
|
||||
* broadcasts.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if((dest_net == BCAST_NET || dest_node == BCAST_NODE)
|
||||
&& (main_config.w95_bug && !(sock->flags & IPX_BROADCAST)))
|
||||
{
|
||||
/* Packet destination address includes a broadcast part,
|
||||
* socket has not enabled the SO_BROADCAST option and
|
||||
* the Windows 95 SO_BROADCAST bug is being emulated.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if((sock->flags & IPX_CONNECTED)
|
||||
&& (src_net != addr32_in(sock->remote_addr.sa_netnum)
|
||||
|| src_node != addr48_in(sock->remote_addr.sa_nodenum)
|
||||
|
Loading…
x
Reference in New Issue
Block a user