diff options
author | Nayana Bidari <nybidari@google.com> | 2020-11-12 22:55:09 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-12 22:57:00 -0800 |
commit | 5bb64ce1b8c42fcd96e44a5be05e17f34a83f840 (patch) | |
tree | 6dbfa200de6de2d6d53ddd8f3e7d35518ef22203 /pkg/tcpip/tests | |
parent | bf392dcc7d7b1f256acfe8acd2758a77db3fc8a2 (diff) |
Refactor SOL_SOCKET options
Store all the socket level options in a struct and call {Get/Set}SockOpt on
this struct. This will avoid implementing socket level options on all
endpoints. This CL contains implementing one socket level option for tcp and
udp endpoints.
PiperOrigin-RevId: 342203981
Diffstat (limited to 'pkg/tcpip/tests')
-rw-r--r-- | pkg/tcpip/tests/integration/multicast_broadcast_test.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/tcpip/tests/integration/multicast_broadcast_test.go b/pkg/tcpip/tests/integration/multicast_broadcast_test.go index 1eecd7957..9d30329f5 100644 --- a/pkg/tcpip/tests/integration/multicast_broadcast_test.go +++ b/pkg/tcpip/tests/integration/multicast_broadcast_test.go @@ -514,9 +514,7 @@ func TestReuseAddrAndBroadcast(t *testing.T) { t.Fatalf("eps[%d].SetSockOptBool(tcpip.ReuseAddressOption, true): %s", len(eps), err) } - if err := ep.SetSockOptBool(tcpip.BroadcastOption, true); err != nil { - t.Fatalf("eps[%d].SetSockOptBool(tcpip.BroadcastOption, true): %s", len(eps), err) - } + ep.SocketOptions().SetBroadcast(true) bindAddr := tcpip.FullAddress{Port: localPort} if bindWildcard { |