Fix logging maybe panic
This commit is contained in:
parent
3144f43fc2
commit
2a33d64abc
1 changed files with 6 additions and 2 deletions
|
|
@ -148,9 +148,11 @@ func (t *NativeTun) configure(tunLink netlink.Link) error {
|
|||
if t.options.GSO {
|
||||
err = t.enableGSO()
|
||||
if err != nil {
|
||||
if t.options.Logger != nil {
|
||||
t.options.Logger.Warn(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var rxChecksumOffload bool
|
||||
rxChecksumOffload, err = checkChecksumOffload(t.options.Name, unix.ETHTOOL_GRXCSUM)
|
||||
|
|
@ -275,9 +277,11 @@ func (t *NativeTun) Start() error {
|
|||
if err != nil {
|
||||
t.gro.disableTCPGRO()
|
||||
t.gro.disableUDPGRO()
|
||||
if t.options.Logger != nil {
|
||||
t.options.Logger.Warn(E.Cause(err, "disabled TUN TCP & UDP GRO due to GRO probe error"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if t.options.EXP_ExternalConfiguration {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue