We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6c89a8 commit 8a2ff73Copy full SHA for 8a2ff73
1 file changed
tun_linux.go
@@ -205,14 +205,18 @@ func (t *NativeTun) enableGSO() error {
205
err = setTCPOffload(t.tunFd)
206
if err != nil {
207
if !(errors.Is(err, unix.EPERM) && t.options.FileDescriptor != 0) {
208
- t.options.Logger.Warn(E.Cause(err, "enable offload: set tcp offload"))
+ if t.options.Logger != nil {
209
+ t.options.Logger.Warn(E.Cause(err, "enable offload: set tcp offload"))
210
+ }
211
t.gro.disableTCPGRO()
212
t.gro.disableUDPGRO()
213
}
214
} else {
215
err = setUDPOffload(t.tunFd)
216
- t.options.Logger.Warn(E.Cause(err, "enable offload: set udp offload"))
217
218
+ t.options.Logger.Warn(E.Cause(err, "enable offload: set udp offload"))
219
220
221
222
0 commit comments