Skip to content

Commit 8eff8d0

Browse files
committed
netstack/forwarders: do not unlock unlocked mutex
1 parent 9b21ec9 commit 8eff8d0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

intra/netstack/forwarders.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,10 @@ func (p *processor) deliverPackets() {
177177
pkt := p.pkts.PopFront()
178178
p.mu.Unlock()
179179
if pkt != nil {
180-
if p.icmp.respond(pkt) {
181-
return
180+
if !p.icmp.respond(pkt) {
181+
p.e.InjectInbound(pkt.NetworkProtocolNumber, pkt)
182+
pkt.DecRef()
182183
}
183-
p.e.InjectInbound(pkt.NetworkProtocolNumber, pkt)
184-
pkt.DecRef()
185184
}
186185
p.mu.Lock()
187186
}

0 commit comments

Comments
 (0)