Skip to content

Commit

Permalink
Only log on err
Browse files Browse the repository at this point in the history
  • Loading branch information
lmm committed May 22, 2020
1 parent a162c9f commit b4521e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dataplane/linux/endpoint_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1014,10 +1014,12 @@ func (m *endpointManager) configureInterface(name string) error {
return nil
}

// Try setting accept_ra to 0 and only log if it failed (it might fail if IPv6
// Try setting accept_ra to 0 and just log if it failed (it might fail if IPv6
// was disabled).
err := m.writeProcSys(fmt.Sprintf("/proc/sys/net/ipv6/conf/%s/accept_ra", name), "0")
log.WithField("ifaceName", name).Warnf("Could not set accept_ra: %v", err)
if err != nil {
log.WithField("ifaceName", name).Warnf("Could not set accept_ra: %v", err)
}

log.WithField("ifaceName", name).Info(
"Applying /proc/sys configuration to interface.")
Expand Down

0 comments on commit b4521e4

Please sign in to comment.