mirror of
https://github.com/soypat/lneto.git
synced 2026-08-20 22:49:11 +00:00
Netdev revamp (#145)
* begin working on netdev solution * need to roll back some assumptions in next commit * dual poll/async mode for netdev.Runner * add wake on rx semantics * remove TODO * more reworking of Runner * work on applying @MDr164 suggestions and a couple extra revamps * add newline to end of test file
This commit is contained in:
@@ -550,8 +550,12 @@ func (s *StackAsync) RegisterUDP4(node lneto.StackNode, remoteAddr [4]byte, remo
|
||||
if idx >= cap(s.userUDPs) {
|
||||
return lneto.ErrExhausted
|
||||
}
|
||||
raddr := remoteAddr[:]
|
||||
if remoteAddr == [4]byte{} {
|
||||
raddr = nil
|
||||
}
|
||||
s.userUDPs = s.userUDPs[:idx+1]
|
||||
s.userUDPs[idx].SetStackNode(node, remoteAddr[:], remotePort)
|
||||
s.userUDPs[idx].SetStackNode(node, raddr, remotePort)
|
||||
return s.udps.RegisterMACFiltered(&s.userUDPs[idx], nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user