mirror of
https://github.com/luscis/openlan.git
synced 2025-10-17 06:20:40 +08:00
fea: access for ceci.
This commit is contained in:
12
vendor/golang.org/x/net/ipv6/sockopt_posix.go
generated
vendored
12
vendor/golang.org/x/net/ipv6/sockopt_posix.go
generated
vendored
@@ -2,12 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
|
||||
|
||||
package ipv6
|
||||
|
||||
import (
|
||||
"net"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/net/bpf"
|
||||
@@ -37,7 +38,7 @@ func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
|
||||
return nil, err
|
||||
}
|
||||
if n != sizeofICMPv6Filter {
|
||||
return nil, errOpNoSupport
|
||||
return nil, errNotImplemented
|
||||
}
|
||||
return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
|
||||
}
|
||||
@@ -54,10 +55,11 @@ func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
|
||||
return nil, 0, err
|
||||
}
|
||||
if n != sizeofIPv6Mtuinfo {
|
||||
return nil, 0, errOpNoSupport
|
||||
return nil, 0, errNotImplemented
|
||||
}
|
||||
mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
|
||||
if mi.Addr.Scope_id == 0 {
|
||||
if mi.Addr.Scope_id == 0 || runtime.GOOS == "aix" {
|
||||
// AIX kernel might return a wrong address.
|
||||
return nil, int(mi.Mtu), nil
|
||||
}
|
||||
ifi, err := net.InterfaceByIndex(int(mi.Addr.Scope_id))
|
||||
@@ -74,7 +76,7 @@ func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) erro
|
||||
case ssoTypeGroupReq:
|
||||
return so.setGroupReq(c, ifi, grp)
|
||||
default:
|
||||
return errOpNoSupport
|
||||
return errNotImplemented
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user