mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: fix runtime error caused by slice/array len mismatch
PiperOrigin-RevId: 578563361
This commit is contained in:
committed by
gVisor bot
parent
4a8f42267b
commit
f28e39a2c4
@@ -66,7 +66,8 @@ func writeNATBlob() (*os.File, func(), error) {
|
||||
defer unix.Close(iptSock)
|
||||
|
||||
// Get the iptables info.
|
||||
var NATName = [linux.XT_TABLE_MAXNAMELEN]byte([]byte("nat\x00"))
|
||||
var NATName [linux.XT_TABLE_MAXNAMELEN]byte
|
||||
copy(NATName[:], []byte("nat\x00"))
|
||||
natInfo := linux.IPTGetinfo{Name: NATName}
|
||||
natInfoLen := int32(unsafe.Sizeof(linux.IPTGetinfo{}))
|
||||
_, _, errno := unix.Syscall6(unix.SYS_GETSOCKOPT,
|
||||
|
||||
Reference in New Issue
Block a user