zephyr/include/net
Jukka Rissanen 7d83543379 net: Properly handle pkt IPv4 broadcast destination address
If we receive an IPv4 that has broadcast destination address, then
properly handle it.
This means that for
  * ICMPv4, if CONFIG_NET_ICMPV4_ACCEPT_BROADCAST is set (this is the
    default value) and we receive echo-request then accept the packet.
    Drop other ICMPv4 packets.
  * TCP, drop the packet
  * UDP, accept the packet if the destination address is the broadcast
    address 255.255.255.255 or the subnet broadcast address.
    Drop the packet if the packets broadcast address is not in our
    configured subnet.

In sending side, make sure that we do not route broadcast address
IPv4 packets back to us. Also set Ethernet MAC destination address
properly if destination IPv4 address is broadcast one.

Fixes #10780

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-26 15:37:21 +03:00
..
bt.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
buf.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
coap_link_format.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
coap.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
dhcpv4.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
dns_resolve.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ethernet_mgmt.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ethernet_vlan.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ethernet.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
gptp.h net: gptp: Add clock accuracy selection 2018-10-01 14:48:53 +03:00
hostname.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
http_parser_state.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
http_parser_url.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
http_parser.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
http.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ieee802154_mgmt.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ieee802154_radio.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ieee802154.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ipv4_autoconf.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
lldp.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
lwm2m.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
mii.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
mqtt_types.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
mqtt.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_app.h net: lib: Convert net_app to use log level 2018-10-04 14:13:57 +03:00
net_config.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_context.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_core.h net: logging: Remove function name from NET_DBG if needed 2018-10-19 13:54:50 +03:00
net_event.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_if.h net: ip: Add function to check if IPv4 address is broadcast one 2018-10-26 15:37:21 +03:00
net_ip.h net: Properly handle pkt IPv4 broadcast destination address 2018-10-26 15:37:21 +03:00
net_l2.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_linkaddr.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_mgmt.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_offload.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_pkt.h net: Set used transport protocol to net_pkt 2018-10-26 14:08:43 +03:00
net_stats.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
net_timeout.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
openthread.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
promiscuous.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ptp_time.h net: gptp: Convert SyncReceiptTime to ExtendedTimestamp 2018-10-01 14:48:53 +03:00
sntp.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
socket_offload_ops.h net: sockets: Add getaddrinfo and freeaddrinfo to socket offloading 2018-10-02 11:11:15 +03:00
socket_offload.h net: sockets: Add getaddrinfo and freeaddrinfo to socket offloading 2018-10-02 11:11:15 +03:00
socket.h net: socket.h: Add more BSD defines for getaddrinfo() 2018-10-12 13:06:53 +03:00
tcp.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
tls_credentials.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
trickle.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
udp.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
websocket_console.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
websocket.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
wifi_mgmt.h net: wifi: Allow mgmt interface to compile if not offloaded 2018-10-11 16:28:55 +03:00
wifi.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00