diff options
author | Jianfeng Tan <henry.tjf@antfin.com> | 2020-07-06 20:53:51 +0800 |
---|---|---|
committer | Jianfeng Tan <henry.tjf@antfin.com> | 2020-07-06 20:53:51 +0800 |
commit | 057a2666fa50ac0d0f3b0472a6e1f3d909cc7a12 (patch) | |
tree | 4652f6907a63b76df71519aaf2302284d6d717f1 | |
parent | 0c13538664329cac40d6eccd642909285a6c32a1 (diff) |
hostinet: fix not specifying family field
Creating sockets by hostinet with VFS2 fails due to triggerring a
seccomp violation. In essence, we fails to pass down the field of
family.
We fix this by passing down this field, family.
Fixes #3141
Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com>
-rw-r--r-- | pkg/sentry/socket/hostinet/socket.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/socket/hostinet/socket.go b/pkg/sentry/socket/hostinet/socket.go index a92aed2c9..fda19e7bb 100644 --- a/pkg/sentry/socket/hostinet/socket.go +++ b/pkg/sentry/socket/hostinet/socket.go @@ -708,6 +708,6 @@ func (p *socketProvider) Pair(t *kernel.Task, stype linux.SockType, protocol int func init() { for _, family := range []int{syscall.AF_INET, syscall.AF_INET6} { socket.RegisterProvider(family, &socketProvider{family}) - socket.RegisterProviderVFS2(family, &socketProviderVFS2{}) + socket.RegisterProviderVFS2(family, &socketProviderVFS2{family}) } } |