Skip to content

Commit 4441787

Browse files
committed
fix: improve ARP proxy error handling
1 parent c31176e commit 4441787

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

network/transparent_vlan_endpointclient_linux.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,9 @@ func (client *TransparentVlanEndpointClient) setArpProxy(ifName string) error {
406406
_, err := client.plClient.ExecuteRawCommand(cmd)
407407
if err != nil {
408408
logger.Error("Failed to set ARP proxy", zap.String("interface", ifName), zap.Error(err))
409-
} else {
410-
logger.Info("ARP proxy enabled", zap.String("interface", ifName))
409+
return err
411410
}
412-
return err
411+
return nil
413412
}
414413

415414
func (client *TransparentVlanEndpointClient) AddEndpointRules(epInfo *EndpointInfo) error {
@@ -547,7 +546,6 @@ func (client *TransparentVlanEndpointClient) ConfigureContainerInterfacesAndRout
547546
logger.Info("Skipping adding routes in container ns as requested")
548547
return nil
549548
}
550-
551549
logger.Info("Adding default routes in container ns")
552550
if err := client.addDefaultRoutes(client.containerVethName, 0); err != nil {
553551
return errors.Wrap(err, "failed container ns add default routes")

0 commit comments

Comments
 (0)