conn,device: provide 8 free bytes at packet head to conn.Bind.Send()
This enables a conn.Bind to bring its own encapsulating transport, e.g. VXLAN/Geneve. Updates tailscale/corp#27502 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
parent
022546570f
commit
65cd6eed7d
10 changed files with 58 additions and 39 deletions
|
|
@ -107,8 +107,9 @@ func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *ChannelBind) Send(bufs [][]byte, ep conn.Endpoint) error {
|
||||
func (c *ChannelBind) Send(bufs [][]byte, ep conn.Endpoint, offset int) error {
|
||||
for _, b := range bufs {
|
||||
b = b[offset:]
|
||||
select {
|
||||
case <-c.closeSignal:
|
||||
return net.ErrClosed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue