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