From 09ef9451e5532cc872c2ce3c0e0671845ced4731 Mon Sep 17 00:00:00 2001 From: "Vish (Ishaya) Abrams" Date: Mon, 4 Apr 2022 10:24:57 -0500 Subject: [PATCH] Revert "Ignore ENOPROTOOPT error when setting NETLINK_EXT_ACK to 0" This reverts commit a7f10103f94d2b4814dbd397208bf289490af40d. --- nl/nl_linux.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nl/nl_linux.go b/nl/nl_linux.go index 9db1eca..20ea144 100644 --- a/nl/nl_linux.go +++ b/nl/nl_linux.go @@ -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) {