Use h2c from x/net to handle h2c requests
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
c7d336f958
commit
4360ca14c1
224 changed files with 22414 additions and 11768 deletions
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
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue