From 6012fe9b5965a2f285f2f99312e6cb7ae84b5fa8 Mon Sep 17 00:00:00 2001 From: Marina Ciocea Date: Thu, 28 Jan 2021 06:23:04 -0800 Subject: Respect SO_BINDTODEVICE in unconnected UDP writes Previously, sending on an unconnected UDP socket would ignore the SO_BINDTODEVICE option. Send on the configured interface when an UDP socket is bound to an interface through setsockop SO_BINDTODEVICE. Add packetimpact tests exercising UDP reads and writes with every combination of bound/unbound, broadcast/multicast/unicast destination, and bound/not-bound to device. PiperOrigin-RevId: 354299670 --- test/packetimpact/testbench/dut.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/packetimpact/testbench/dut.go') diff --git a/test/packetimpact/testbench/dut.go b/test/packetimpact/testbench/dut.go index 66a0255b8..d40890e12 100644 --- a/test/packetimpact/testbench/dut.go +++ b/test/packetimpact/testbench/dut.go @@ -544,7 +544,7 @@ func (dut *DUT) SendToWithErrno(ctx context.Context, t *testing.T, sockfd int32, } resp, err := dut.posixServer.SendTo(ctx, &req) if err != nil { - t.Fatalf("faled to call SendTo: %s", err) + t.Fatalf("failed to call SendTo: %s", err) } return resp.GetRet(), syscall.Errno(resp.GetErrno_()) } -- cgit v1.2.3