correctly calculate buffer size of ancillary data

This commit is contained in:
Johannes Kimmel 2023-08-26 23:04:04 +02:00
parent e749e9ab47
commit be3f826fb0
1 changed files with 2 additions and 2 deletions

View File

@ -10,10 +10,10 @@ import (
"net"
"net/netip"
"sync"
"syscall"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
"golang.org/x/sys/unix"
)
const (
@ -21,7 +21,7 @@ const (
)
var (
OOB_SIZE = unix.CmsgSpace(16 + 2) // ipv6 address + port
OOB_SIZE = syscall.CmsgSpace(syscall.SizeofInet6Pktinfo) // ipv6 address + iface index, struct in6_pktinfo
)
func (vx *vx46) transform46(msgs4 []ipv4.Message, msgs6 []ipv6.Message) error {