Skip to content

Commit fc4cbcd

Browse files
committed
netlink: fix strict option check for s390x
1 parent ca0202e commit fc4cbcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conn_linux_integration_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,8 @@ func TestIntegrationConnStrict(t *testing.T) {
853853

854854
err = sc.Control(func(fd uintptr) {
855855
for k := range opts {
856-
// The kernel uses 0 for false and 1 for true.
857-
if v, err := unix.GetsockoptInt(int(fd), unix.SOL_NETLINK, k); err == nil && v == 1 {
856+
// The kernel returns a non-zero value for true.
857+
if v, err := unix.GetsockoptInt(int(fd), unix.SOL_NETLINK, k); err == nil && v != 0 {
858858
opts[k] = true
859859
}
860860
}

0 commit comments

Comments
 (0)