diff options
author | Chris Kuiper <ckuiper@google.com> | 2019-07-24 13:40:52 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-24 13:42:14 -0700 |
commit | 40e682759fd68bf94d324cef584c5e9288acb049 (patch) | |
tree | 08a4bc36c10aecaf4edde00f03e315e7a3d3c533 /pkg/tcpip/transport/udp | |
parent | 7e38d643334647fb79c7cc8be35745699de264e6 (diff) |
Add support for a subnet prefix length on interface network addresses
This allows the user code to add a network address with a subnet prefix length.
The prefix length value is stored in the network endpoint and provided back to
the user in the ProtocolAddress type.
PiperOrigin-RevId: 259807693
Diffstat (limited to 'pkg/tcpip/transport/udp')
-rw-r--r-- | pkg/tcpip/transport/udp/udp_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/transport/udp/udp_test.go b/pkg/tcpip/transport/udp/udp_test.go index 958d5712e..56c285f88 100644 --- a/pkg/tcpip/transport/udp/udp_test.go +++ b/pkg/tcpip/transport/udp/udp_test.go @@ -967,14 +967,14 @@ func TestTTL(t *testing.T) { multicast = false switch variant { case "v4", "mapped": - ep, err := ipv4.NewProtocol().NewEndpoint(0, "", nil, nil, nil) + ep, err := ipv4.NewProtocol().NewEndpoint(0, tcpip.AddressWithPrefix{}, nil, nil, nil) if err != nil { t.Fatal(err) } wantTTL = ep.DefaultTTL() ep.Close() case "v6": - ep, err := ipv6.NewProtocol().NewEndpoint(0, "", nil, nil, nil) + ep, err := ipv6.NewProtocol().NewEndpoint(0, tcpip.AddressWithPrefix{}, nil, nil, nil) if err != nil { t.Fatal(err) } |