We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While looking at #152, I noticed that the fib handling on FreeBSD looks odd. It assigns to t->fd only if the setsockopt call fails.
fib
t->fd
setsockopt
MLVPN/src/mlvpn.c
Lines 850 to 860 in 2263bab
This will likely need a further #if to work as intended, something like
#if
#if defined(HAVE_FREEBSD) || defined(HAVE_OPENBSD) #if defined(HAVE_FREEBSD) if (fib > 0 && setsockopt(fd, SOL_SOCKET, SO_SETFIB, &fib, sizeof(fib)) < 0) #elif defined(HAVE_OPEBSD) if (fib > 0 && setsockopt(fd, SOL_SOCKET, SO_RTABLE, &fib, sizeof(fib)) < 0) #endif { log_warn(NULL, "Cannot set FIB %d for kernel socket", fib); goto error; } #endif
Or assign SO_SETFIB or SO_RTABLE to a variable and avoid the duplicated conditional.
SO_SETFIB
SO_RTABLE
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While looking at #152, I noticed that the
fib
handling on FreeBSD looks odd. It assigns tot->fd
only if thesetsockopt
call fails.MLVPN/src/mlvpn.c
Lines 850 to 860 in 2263bab
This will likely need a further
#if
to work as intended, something likeOr assign
SO_SETFIB
orSO_RTABLE
to a variable and avoid the duplicated conditional.The text was updated successfully, but these errors were encountered: