mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-16 19:47:05 +02:00
plumb ECN through via relays
This commit is contained in:
@@ -254,7 +254,8 @@ retry:
|
||||
return n, ep, nil
|
||||
}
|
||||
|
||||
func (u *RIOConn) WriteTo(buf []byte, ip netip.AddrPort) error {
|
||||
// WriteTo ignores outerECN; per-packet ECN marking is not implemented on windows.
|
||||
func (u *RIOConn) WriteTo(buf []byte, ip netip.AddrPort, _ byte) error {
|
||||
if !u.isOpen.Load() {
|
||||
return net.ErrClosed
|
||||
}
|
||||
@@ -321,7 +322,7 @@ func (u *RIOConn) WriteBatch(bufs [][]byte, addrs []netip.AddrPort, _ []byte) (i
|
||||
// An un-sendable destination costs its own packet, never the ones behind it in the batch.
|
||||
written := 0
|
||||
for i, b := range bufs {
|
||||
if err := u.WriteTo(b, addrs[i]); err == nil {
|
||||
if err := u.WriteTo(b, addrs[i], 0); err == nil {
|
||||
written++
|
||||
} else {
|
||||
u.l.Debug("failed to write packet in batch", "udpAddr", addrs[i], "error", err)
|
||||
|
||||
Reference in New Issue
Block a user