Skip to content

Commit

Permalink
Fix eBPF pause handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pappz committed Oct 7, 2024
1 parent f18ae8b commit 48184ec
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion client/internal/wgproxy/ebpf/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@ func (p *ProxyWrapper) proxyToLocal(ctx context.Context) {
return
}

if err := p.WgeBPFProxy.sendPkg(buf[:n], p.wgEndpointAddr.Port); err != nil {
p.pausedMu.Lock()
if p.paused {
p.pausedMu.Unlock()
continue
}

err := p.WgeBPFProxy.sendPkg(buf[:n], p.wgEndpointAddr.Port)
p.pausedMu.Unlock()

if err != nil {
if ctx.Err() != nil {
return
}
Expand Down

0 comments on commit 48184ec

Please sign in to comment.