HomeFreeBSD

garp: Fix vnet related panic for gratuitous arp

Description

garp: Fix vnet related panic for gratuitous arp

Gratuitous ARP packets are sent from a timer, which means we don't have a vnet
context set. As a result we panic trying to send the packet.

Set the vnet context based on the interface associated with the interface
address.

To reproduce:

sysctl net.link.ether.inet.garp_rexmit_count=2
ifconfig vtnet1 10.0.0.1/24 up

PR: 235699
Reviewed by: vangyzen@
MFC after: 1 week

Details

Provenance
kpAuthored on
Parents
rS344060: Further correct and optimize the bus_dma(9) usage of iflib(4):
Branches
Unknown
Tags
Unknown