Add EthernetHeader only if underlying NIC has a mac address.

Fixes #6532

PiperOrigin-RevId: 395741741
This commit is contained in:
Bhasker Hariharan
2021-09-09 11:07:01 -07:00
committed by gVisor bot
parent e90ecdb488
commit 5e9c3a0b93
+1 -1
View File
@@ -210,7 +210,7 @@ func (n *Network) CreateLinksAndRoutes(args *CreateLinksAndRoutesArgs, _ *struct
linkEP, err := fdbased.New(&fdbased.Options{
FDs: FDs,
MTU: uint32(link.MTU),
EthernetHeader: true,
EthernetHeader: mac != "",
Address: mac,
PacketDispatchMode: fdbased.RecvMMsg,
GSOMaxSize: link.GSOMaxSize,