HedongGao opened a new pull request, #17702:
URL: https://github.com/apache/nuttx/pull/17702
## 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})")
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]