0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

CONFIG_SKIP_MC_BIND added.

BSD hates it, Linux needs it.
This commit is contained in:
Ondrej Filip 2004-06-03 08:18:14 +00:00
parent cb4dd4e2f7
commit 7d72aadb8a
7 changed files with 11 additions and 0 deletions

View File

@ -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_IFACE Use Unix interface scanner
CONFIG_UNIX_SET Use Unix route setting CONFIG_UNIX_SET Use Unix route setting
CONFIG_UNIX_DONTROUTE Use setsockopts DONTROUTE (undef for *BSD) 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_LINUX_SCAN Use Linux /proc/net/route scanner
CONFIG_ALL_MULTICAST krt-iface: All devices support multicasting (i.e., ignore IFF_MULTICAST) CONFIG_ALL_MULTICAST krt-iface: All devices support multicasting (i.e., ignore IFF_MULTICAST)

View File

@ -15,6 +15,7 @@
#undef CONFIG_UNIX_IFACE #undef CONFIG_UNIX_IFACE
#undef CONFIG_UNIX_SET #undef CONFIG_UNIX_SET
#define CONFIG_SKIP_MC_BIND
#define CONFIG_ALL_MULTICAST #define CONFIG_ALL_MULTICAST
#define CONFIG_UNNUM_MULTICAST #define CONFIG_UNNUM_MULTICAST

View File

@ -14,6 +14,7 @@
#undef CONFIG_UNIX_SET #undef CONFIG_UNIX_SET
#undef CONFIG_UNIX_DONTROUTE #undef CONFIG_UNIX_DONTROUTE
#define CONFIG_SKIP_MC_BIND
#define CONFIG_ALL_MULTICAST #define CONFIG_ALL_MULTICAST
#define CONFIG_UNNUM_MULTICAST #define CONFIG_UNNUM_MULTICAST

View File

@ -13,6 +13,7 @@
#define CONFIG_UNIX_IFACE #define CONFIG_UNIX_IFACE
#define CONFIG_UNIX_SET #define CONFIG_UNIX_SET
#define CONFIG_UNIX_DONTROUTE #define CONFIG_UNIX_DONTROUTE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_SCAN #define CONFIG_LINUX_SCAN
#define CONFIG_LINUX_MC_MREQ_BIND #define CONFIG_LINUX_MC_MREQ_BIND

View File

@ -13,6 +13,7 @@
#define CONFIG_UNIX_IFACE #define CONFIG_UNIX_IFACE
#define CONFIG_UNIX_SET #define CONFIG_UNIX_SET
#define CONFIG_UNIX_DONTROUTE #define CONFIG_UNIX_DONTROUTE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_SCAN #define CONFIG_LINUX_SCAN
#define CONFIG_LINUX_MC_MREQN #define CONFIG_LINUX_MC_MREQN

View File

@ -11,6 +11,8 @@
#define CONFIG_MULTIPLE_TABLES #define CONFIG_MULTIPLE_TABLES
#define CONFIG_ALL_TABLES_AT_ONCE #define CONFIG_ALL_TABLES_AT_ONCE
#undef CONFIG_SKIP_MC_BIND
#define CONFIG_LINUX_MC_MREQN #define CONFIG_LINUX_MC_MREQN
#define CONFIG_UNIX_DONTROUTE #define CONFIG_UNIX_DONTROUTE

View File

@ -754,7 +754,11 @@ sk_open(sock *s)
ERR("SO_REUSEADDR"); ERR("SO_REUSEADDR");
} }
fill_in_sockaddr(&sa, s->saddr, port); 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) if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
#endif
ERR("bind"); ERR("bind");
} }
fill_in_sockaddr(&sa, s->daddr, s->dport); fill_in_sockaddr(&sa, s->daddr, s->dport);