Commit 7d72aadb authored by Ondřej Filip's avatar Ondřej Filip

CONFIG_SKIP_MC_BIND added.

BSD hates it, Linux needs it.
parent cb4dd4e2
......@@ -9,6 +9,7 @@ CONFIG_ALL_TABLES_AT_ONCE Kernel scanner wants to process all tables at once
CONFIG_UNIX_IFACE Use Unix interface scanner
CONFIG_UNIX_SET Use Unix route setting
CONFIG_UNIX_DONTROUTE Use setsockopts DONTROUTE (undef for *BSD)
CONFIG_SKIP_MC_BIND Don't call bird on multicast socket (def for *BSD)
CONFIG_LINUX_SCAN Use Linux /proc/net/route scanner
CONFIG_ALL_MULTICAST krt-iface: All devices support multicasting (i.e., ignore IFF_MULTICAST)
......
......@@ -15,6 +15,7 @@
#undef CONFIG_UNIX_IFACE
#undef CONFIG_UNIX_SET
#define CONFIG_SKIP_MC_BIND
#define CONFIG_ALL_MULTICAST
#define CONFIG_UNNUM_MULTICAST
......
......@@ -14,6 +14,7 @@
#undef CONFIG_UNIX_SET
#undef CONFIG_UNIX_DONTROUTE
#define CONFIG_SKIP_MC_BIND
#define CONFIG_ALL_MULTICAST
#define CONFIG_UNNUM_MULTICAST
......
......@@ -13,6 +13,7 @@
#define CONFIG_UNIX_IFACE
#define CONFIG_UNIX_SET
#define CONFIG_UNIX_DONTROUTE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_SCAN
#define CONFIG_LINUX_MC_MREQ_BIND
......
......@@ -13,6 +13,7 @@
#define CONFIG_UNIX_IFACE
#define CONFIG_UNIX_SET
#define CONFIG_UNIX_DONTROUTE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_SCAN
#define CONFIG_LINUX_MC_MREQN
......
......@@ -11,6 +11,8 @@
#define CONFIG_MULTIPLE_TABLES
#define CONFIG_ALL_TABLES_AT_ONCE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_MC_MREQN
#define CONFIG_UNIX_DONTROUTE
......
......@@ -754,7 +754,11 @@ sk_open(sock *s)
ERR("SO_REUSEADDR");
}
fill_in_sockaddr(&sa, s->saddr, port);
#ifdef CONFIG_SKIP_MC_BIND
if (type == SK_IP && bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
#else
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
#endif
ERR("bind");
}
fill_in_sockaddr(&sa, s->daddr, s->dport);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment