wenquan2015 opened a new pull request, #17688:
URL: https://github.com/apache/nuttx/pull/17688
## Summary
support ARP entry learned on gratuitous ARP
## Impact
arp
## Testing
```
from scapy.all import *
def send_gratuitous_arp(ip, iface=None):
arp = ARP(
op=1,
psrc=ip,
pdst=ip
)
ether = Ether(dst="ff:ff:ff:ff:ff:ff")
packet = ether/arp
sendp(packet, iface=iface)
send_gratuitous_arp("10.0.1.4", "nuttx0")
```
test result, targe ip 10.0.1.4 is not exist, when received gratuitous ARP,
the icmp request can be sent out
:
```
14:44:00.835864 ARP, Request who-has 10.0.1.4 tell 10.0.1.2, length 28
14:44:01.845825 ARP, Request who-has 10.0.1.4 tell 10.0.1.2, length 28
14:44:02.855858 ARP, Request who-has 10.0.1.4 tell 10.0.1.2, length 28
14:44:03.679762 ARP, Request who-has 10.0.1.4 tell 10.0.1.4, length 28
14:44:03.865695 IP 10.0.1.2 > 10.0.1.4: ICMP echo request, id 2, seq 4,
length 64
14:44:04.875830 IP 10.0.1.2 > 10.0.1.4: ICMP echo request, id 2, seq 5,
length 64
14:44:05.886016 IP 10.0.1.2 > 10.0.1.4: ICMP echo request, id 2, seq 6,
length 64
```
--
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]