From 1c666576d584fd827dfcefdbabe797f391487624 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 21 May 2018 20:13:39 +0200 Subject: [PATCH] User cookie is closer to fwmark than setfib --- conn_default.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conn_default.go b/conn_default.go index 9f1e0b0..739fc83 100644 --- a/conn_default.go +++ b/conn_default.go @@ -151,10 +151,10 @@ func (bind *NativeBind) SetMark(mark uint32) error { return err2 } err3 := fd4.Control(func(fd uintptr) { - err1 = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, 0x1014 /* unix.SO_SETFIB */, int(mark)) + err1 = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, 0x1015 /* unix.SO_USER_COOKIE */, int(mark)) }) err4 := fd6.Control(func(fd uintptr) { - err2 = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, 0x1014 /* unix.SO_SETFIB */, int(mark)) + err2 = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, 0x1015 /* unix.SO_USER_COOKIE */, int(mark)) }) if err1 != nil { return err1