Commit da5b8181 authored by Mikio Hara's avatar Mikio Hara

go.net/ipv4: ignore ENOPROTOOPT in ancillary data socket option tests

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/154260043
parent 68e5815b
...@@ -14,13 +14,15 @@ import ( ...@@ -14,13 +14,15 @@ import (
func protocolNotSupported(err error) bool { func protocolNotSupported(err error) bool {
switch err := err.(type) { switch err := err.(type) {
case syscall.Errno: case syscall.Errno:
if err == syscall.EPROTONOSUPPORT { switch err {
case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
return true return true
} }
case *os.SyscallError: case *os.SyscallError:
switch err := err.Err.(type) { switch err := err.Err.(type) {
case syscall.Errno: case syscall.Errno:
if err == syscall.EPROTONOSUPPORT { switch err {
case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT:
return true return true
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment