Skip to content

Commit

Permalink
Better e2e errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Sep 24, 2024
1 parent 3ed4dd7 commit fd4d68a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions e2e/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,11 @@ func (r *R) RouteUntilTxTun(sender *nebula.Control, receiver *nebula.Control) []
// Nope, lets push the sender along
case p := <-udpTx:
r.Lock()
c := r.getControl(sender.GetUDPAddr(), p.To, p)
a := sender.GetUDPAddr()
c := r.getControl(a, p.To, p)
if c == nil {
r.Unlock()
panic("No control for udp tx")
panic("No control for udp tx " + a.String())
}
fp := r.unlockedInjectFlow(sender, c, p, false)
c.InjectUDPPacket(p)
Expand Down Expand Up @@ -483,10 +484,11 @@ func (r *R) RouteForAllUntilTxTun(receiver *nebula.Control) []byte {
} else {
// we are a udp tx, route and continue
p := rx.Interface().(*udp.Packet)
c := r.getControl(cm[x].GetUDPAddr(), p.To, p)
a := cm[x].GetUDPAddr()
c := r.getControl(a, p.To, p)
if c == nil {
r.Unlock()
panic("No control for udp tx")
panic("No control for udp tx " + a.String())
}
fp := r.unlockedInjectFlow(cm[x], c, p, false)
c.InjectUDPPacket(p)
Expand Down

0 comments on commit fd4d68a

Please sign in to comment.