Skip to content

IP: Zephyr replies to broadcast ethernet packets in other subnets on the same wire #14647

@dgloeck

Description

@dgloeck

Describe the bug
When Zephyr is configured to IP address 192.168.2.166 with netmask 255.255.255.0, it will try to send ICMP port unreachable packets for broadcast packets sent to 192.168.17.255 by other computers in the same ethernet broadcast domain using 192.168.17.255 as sender IP address.

There is a check in ethernet_recv that drops all unicast packets not destined for the board, but packets with broadcast and multicast L2 address are alwas accepted. The next check is in net_conn_input, where packets are forwarded to the callbacks of the connections. The remaining IP packets are silently dropped if they are multicast packets. But other packets (this includes broadcast packets of other subnets) are rejected with send_icmp_error.

Expected behavior
Zephyr should never reply with an ICMP port unreachable packet to packets with a destination IP address that it does not own.

Impact
annoyance

Environment (please complete the following information):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions