From 4e6f3a0c71e4107efb5c9446508876f942b30ec7 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 18 Oct 2019 14:02:52 -0700 Subject: Remove restrictions on the sending address It is quite legal to send from the ANY address (it is required for DHCP). I can't figure out why the broadcast address was included here, so removing that as well. PiperOrigin-RevId: 275541954 --- pkg/tcpip/stack/nic.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'pkg/tcpip/stack') diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index 43f4ad91e..12c82f8b8 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -173,11 +173,6 @@ func (n *NIC) primaryEndpoint(protocol tcpip.NetworkProtocolNumber) *referencedN for e := list.Front(); e != nil; e = e.Next() { r := e.(*referencedNetworkEndpoint) - // TODO(crawshaw): allow broadcast address when SO_BROADCAST is set. - switch r.ep.ID().LocalAddress { - case header.IPv4Broadcast, header.IPv4Any: - continue - } if r.isValidForOutgoing() && r.tryIncRef() { return r } -- cgit v1.2.3