Skip to content

Commit 8226803

Browse files
committed
Merge release-20210125.0-12-g6012fe9b5 (automated)
2 parents d34fe8d + 6012fe9 commit 8226803

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/tcpip/tcpip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ type Endpoint interface {
662662
// connected returns nil. Calling connect again results in ErrAlreadyConnected.
663663
// Anything else -- the attempt to connect failed.
664664
//
665-
// If address.Addr is empty, this means that Enpoint has to be
665+
// If address.Addr is empty, this means that Endpoint has to be
666666
// disconnected if this is supported, otherwise
667667
// ErrAddressFamilyNotSupported must be returned.
668668
Connect(address FullAddress) *Error

pkg/tcpip/transport/udp/endpoint.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,9 @@ func (e *endpoint) write(p tcpip.Payloader, opts tcpip.WriteOptions) (int64, *tc
480480
// Reject destination address if it goes through a different
481481
// NIC than the endpoint was bound to.
482482
nicID := to.NIC
483+
if nicID == 0 {
484+
nicID = tcpip.NICID(e.ops.GetBindToDevice())
485+
}
483486
if e.BindNICID != 0 {
484487
if nicID != 0 && nicID != e.BindNICID {
485488
return 0, tcpip.ErrNoRoute

0 commit comments

Comments
 (0)