Fix incorrect printf verb

tcpip.Error does not implement error and thus cannot be used with %w.

This was flagged by nogo.

PiperOrigin-RevId: 403458480
This commit is contained in:
Michael Pratt
2021-10-15 13:52:42 -07:00
committed by gVisor bot
parent 33b41d8fe9
commit 04dc27899b
+1 -1
View File
@@ -213,7 +213,7 @@ func newNetstackImpl(mode string) (impl, error) {
AddressWithPrefix: parsedAddr.WithPrefix(),
}
if err := s.AddProtocolAddress(nicID, protocolAddr, stack.AddressProperties{}); err != nil {
return nil, fmt.Errorf("error adding IP address %+v to %q: %w", protocolAddr, *iface, err)
return nil, fmt.Errorf("error adding IP address %+v to %q: %s", protocolAddr, *iface, err)
}
subnet, err := tcpip.NewSubnet(parsedDest, parsedMask)