1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00
serenity/Kernel/Net
Gunnar Beutner a85d111cd1 Kernel: Respond to packets sent to the directed broadcast address
The last IP address in an IPv4 subnet is considered the directed
broadcast address, e.g. for 192.168.3.0/24 the directed broadcast
address is 192.168.3.255. We need to consider this address as
belonging to the interface.

Here's an example with this fix applied, SerenityOS has 192.168.3.190:

[gunnar@nyx ~]$ ping -b 192.168.3.255
WARNING: pinging broadcast address
PING 192.168.3.255 (192.168.3.255) 56(84) bytes of data.
64 bytes from 192.168.3.175: icmp_seq=1 ttl=64 time=0.950 ms
64 bytes from 192.168.3.188: icmp_seq=1 ttl=64 time=2.33 ms
64 bytes from 192.168.3.46: icmp_seq=1 ttl=64 time=2.77 ms
64 bytes from 192.168.3.41: icmp_seq=1 ttl=64 time=4.15 ms
64 bytes from 192.168.3.190: icmp_seq=1 ttl=64 time=29.4 ms
64 bytes from 192.168.3.42: icmp_seq=1 ttl=64 time=30.8 ms
64 bytes from 192.168.3.55: icmp_seq=1 ttl=64 time=31.0 ms
64 bytes from 192.168.3.30: icmp_seq=1 ttl=64 time=33.2 ms
64 bytes from 192.168.3.31: icmp_seq=1 ttl=64 time=33.2 ms
64 bytes from 192.168.3.173: icmp_seq=1 ttl=64 time=41.7 ms
64 bytes from 192.168.3.43: icmp_seq=1 ttl=64 time=47.7 ms
^C
--- 192.168.3.255 ping statistics ---
1 packets transmitted, 1 received, +10 duplicates, 0% packet loss,
time 0ms, rtt min/avg/max/mdev = 0.950/23.376/47.676/16.539 ms
[gunnar@nyx ~]$
2021-04-26 18:39:59 +02:00
..
ARP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
E1000NetworkAdapter.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
E1000NetworkAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EthernetFrameHeader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EtherType.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICMP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IPv4.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IPv4Socket.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
IPv4Socket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IPv4SocketTuple.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LocalSocket.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
LocalSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LoopbackAdapter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LoopbackAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NE2000NetworkAdapter.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
NE2000NetworkAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NetworkAdapter.cpp Kernel: Respond to packets sent to the directed broadcast address 2021-04-26 18:39:59 +02:00
NetworkAdapter.h Kernel: Respond to packets sent to the directed broadcast address 2021-04-26 18:39:59 +02:00
NetworkTask.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
NetworkTask.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Routing.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
Routing.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
RTL8139NetworkAdapter.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
RTL8139NetworkAdapter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Socket.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
Socket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TCP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TCPSocket.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
TCPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDP.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
UDPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00