Skip to content

Conversation

@HedongGao
Copy link
Contributor

Summary

When the interface turns off the arp learning capability, it should not learn arp from the IP message even if the ARP_IPIN function is enabled.

Impact

The ARP_IPIN function is invalid for the interface that turns off the arp learning ability.

Testing

  1. Enable the CONFIG_ARP_IPIN compilation option and set up the SIM test environment;
  2. Set the interface NOARP attribute in SIM;
  3. Construct an icmp request message on the host side and send it to the SIM. It is observed that there is no response from the SIM side;
  4. The SIM end enables the interface ARP learning capability and sends the icmp request message from the host again. The host end can receive the icmp reply message.

`
from scapy.all import Ether, IP, ICMP, sendp

SRC_MAC = "fa:b1:d9:6d:a0:d3"
DST_MAC = "42:e1:c4:3f:48:dd"
SRC_IP = "10.0.1.1"
DST_IP = "10.0.1.2"
IFACE = "eth0"

packet = (
Ether(src=SRC_MAC, dst=DST_MAC) /
IP(src=SRC_IP, dst=DST_IP) /
ICMP(type=8, code=0)
)

print("Constructed ICMP Request Packet:")
packet.show()

sendp(packet, iface=IFACE, verbose=1)
print(f"\nICMP request sent from {SRC_IP}({SRC_MAC}) to {DST_IP}({DST_MAC})")
`

Dont learn arp information from ip packet if interface is noarp

Signed-off-by: gaohedong <[email protected]>
@github-actions github-actions bot added Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small labels Dec 28, 2025
@xiaoxiang781216 xiaoxiang781216 merged commit ca7c6e2 into apache:master Dec 29, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants