From 6be71641ef3baa8658d031f3624f4481b493bdaf Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sat, 28 Jul 2018 16:54:06 +0200 Subject: BSD: Use MSG_DONTROUTE for unicast packets on FreeBSD BSD systems cannot use SO_DONTROUTE, because it does not work properly with multicast packets (perhaps it tries to find iface based on multicast group address). But we can use MSG_DONTROUTE sendmsg() flag for unicast packets. Works on FreeBSD, is ignored on OpenBSD and is broken on NetBSD (i guess due to integrated routing table and ARP table). --- sysdep/cf/README | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdep/cf/README') diff --git a/sysdep/cf/README b/sysdep/cf/README index e62c3481..9a7a4afa 100644 --- a/sysdep/cf/README +++ b/sysdep/cf/README @@ -11,6 +11,7 @@ CONFIG_MC_PROPER_SRC Multicast packets have source address according to socket s CONFIG_SKIP_MC_BIND Don't call bind on multicast socket (def for *BSD) CONFIG_NO_IFACE_BIND Bind to iface is not available, use workarounds (def for *BSD) CONFIG_UNIX_DONTROUTE Use setsockopts DONTROUTE (undef for *BSD) +CONFIG_DONTROUTE_UNICAST Use MSG_DONTROUTE flag for unicast packets (def for FreeBSD) CONFIG_USE_HDRINCL Use IP_HDRINCL instead of control messages for source address on raw IP sockets. CONFIG_RESTRICTED_PRIVILEGES Implements restricted privileges using drop_uid() -- cgit v1.2.3