summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/netstack
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-12-12 19:12:48 +0000
committergVisor bot <gvisor-bot@google.com>2019-12-12 19:12:48 +0000
commitbbea3a5df7d107311788fa34a9e3e633473a3ddc (patch)
tree734d525a1b1c847671a12edee6da60c38a771889 /pkg/sentry/socket/netstack
parent9d480fed246fe34f862260177bd437f7e3716a15 (diff)
parent378d6c1f3697b8b939e6632e980562bfc8fb2781 (diff)
Merge release-20191210.0-25-g378d6c1 (automated)
Diffstat (limited to 'pkg/sentry/socket/netstack')
-rwxr-xr-xpkg/sentry/socket/netstack/netstack.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go
index 8a6522eac..140851c17 100755
--- a/pkg/sentry/socket/netstack/netstack.go
+++ b/pkg/sentry/socket/netstack/netstack.go
@@ -326,7 +326,7 @@ func AddressAndFamily(sfamily int, addr []byte, strict bool) (tcpip.FullAddress,
}
family := usermem.ByteOrder.Uint16(addr)
- if family != uint16(sfamily) && (!strict && family != linux.AF_UNSPEC) {
+ if family != uint16(sfamily) && (strict || family != linux.AF_UNSPEC) {
return tcpip.FullAddress{}, family, syserr.ErrAddressFamilyNotSupported
}