Revert "Ignore ENOPROTOOPT error when setting NETLINK_EXT_ACK to 0"

This reverts commit a7f10103f9.
This commit is contained in:
Vish (Ishaya) Abrams 2022-04-04 10:24:57 -05:00 committed by GitHub
parent 4d5d261205
commit 09ef9451e5
1 changed files with 1 additions and 7 deletions

View File

@ -798,13 +798,7 @@ func (s *NetlinkSocket) SetExtAck(enable bool) error {
enableN = 1
}
var err error
if err = unix.SetsockoptInt(int(s.fd), unix.SOL_NETLINK, unix.NETLINK_EXT_ACK, enableN); err == unix.ENOPROTOOPT && !enable {
// older kernels may not support NETLINK_EXT_ACK
return nil
}
return err
return unix.SetsockoptInt(int(s.fd), unix.SOL_NETLINK, unix.NETLINK_EXT_ACK, enableN)
}
func (s *NetlinkSocket) GetPid() (uint32, error) {