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 3bce00a commit 26da27e
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 @@ -1033,10 +1033,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 26da27e

Please sign in to comment.