diff options
author | Kevin Krakauer <krakauer@google.com> | 2019-05-22 13:44:07 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-22 13:45:15 -0700 |
commit | c1cdf18e7bd21a9785462914ca8aa2056c81369a (patch) | |
tree | 2d53aca7fb685405940c49ac83f29743a5c96293 /pkg/sentry/socket/epsocket | |
parent | 69eac1198f3dae9a41ddf1903e9dda7972ed5d77 (diff) |
UDP and TCP raw socket support.
PiperOrigin-RevId: 249511348
Change-Id: I34539092cc85032d9473ff4dd308fc29dc9bfd6b
Diffstat (limited to 'pkg/sentry/socket/epsocket')
-rw-r--r-- | pkg/sentry/socket/epsocket/provider.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/socket/epsocket/provider.go b/pkg/sentry/socket/epsocket/provider.go index 5a89a63fb..fb1815c2d 100644 --- a/pkg/sentry/socket/epsocket/provider.go +++ b/pkg/sentry/socket/epsocket/provider.go @@ -70,6 +70,10 @@ func getTransportProtocol(ctx context.Context, stype transport.SockType, protoco switch protocol { case syscall.IPPROTO_ICMP: return header.ICMPv4ProtocolNumber, nil + case syscall.IPPROTO_UDP: + return header.UDPProtocolNumber, nil + case syscall.IPPROTO_TCP: + return header.TCPProtocolNumber, nil } } return 0, syserr.ErrInvalidArgument |