diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2020-08-08 17:43:15 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-08 17:45:19 -0700 |
commit | b404b5c255214a37d7f787f9fe24bb8e22509eb4 (patch) | |
tree | 904e6f0959b6db7c48fb71eeaa243642a24717ff /pkg/tcpip/transport/udp | |
parent | 13a8ae81b2361cd32f8e73d14ca5b9bca9569b1a (diff) |
Use unicast source for ICMP echo replies
Packets MUST NOT use a non-unicast source address for ICMP
Echo Replies.
Test: integration_test.TestPingMulticastBroadcast
PiperOrigin-RevId: 325634380
Diffstat (limited to 'pkg/tcpip/transport/udp')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go index b7d735889..444b5b01c 100644 --- a/pkg/tcpip/transport/udp/endpoint.go +++ b/pkg/tcpip/transport/udp/endpoint.go @@ -499,7 +499,7 @@ func (e *endpoint) write(p tcpip.Payloader, opts tcpip.WriteOptions) (int64, <-c resolve = route.Resolve } - if !e.broadcast && route.IsBroadcast() { + if !e.broadcast && route.IsOutboundBroadcast() { return 0, nil, tcpip.ErrBroadcastDisabled } |