diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-01 12:32:02 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-01 12:32:02 +0200 |
commit | b613b9928bdb1df3bd541d318d7f9c1bf492dfbc (patch) | |
tree | 30f04c90d3cdd5916c0586f8f8f65b3c9288cb10 /sysdep | |
parent | 7fdd338c3600aa4e7a0ae3d5ce270b5a1f8ccc0c (diff) | |
download | bird-b613b9928bdb1df3bd541d318d7f9c1bf492dfbc.tar bird-b613b9928bdb1df3bd541d318d7f9c1bf492dfbc.zip |
#ifdef CONFIG_UNIX_DONTROUTE added.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/cf/README | 1 | ||||
-rw-r--r-- | sysdep/cf/bsd.h | 1 | ||||
-rw-r--r-- | sysdep/cf/linux-20.h | 1 | ||||
-rw-r--r-- | sysdep/cf/linux-21.h | 1 | ||||
-rw-r--r-- | sysdep/cf/linux-22.h | 1 | ||||
-rw-r--r-- | sysdep/unix/io.c | 6 |
6 files changed, 9 insertions, 2 deletions
diff --git a/sysdep/cf/README b/sysdep/cf/README index a344275..b278fc5 100644 --- a/sysdep/cf/README +++ b/sysdep/cf/README @@ -8,6 +8,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_LINUX_SCAN Use Linux /proc/net/route scanner CONFIG_ALL_MULTICAST krt-iface: All devices support multicasting (i.e., ignore IFF_MULTICAST) diff --git a/sysdep/cf/bsd.h b/sysdep/cf/bsd.h index cfce773..f147506 100644 --- a/sysdep/cf/bsd.h +++ b/sysdep/cf/bsd.h @@ -12,6 +12,7 @@ #undef CONFIG_UNIX_IFACE #undef CONFIG_UNIX_SET +#undef CONFIG_UNIX_DONTROUTE #define CONFIG_ALL_MULTICAST #define CONFIG_UNNUM_MULTICAST diff --git a/sysdep/cf/linux-20.h b/sysdep/cf/linux-20.h index 5c6a237..247f0f1 100644 --- a/sysdep/cf/linux-20.h +++ b/sysdep/cf/linux-20.h @@ -12,6 +12,7 @@ #define CONFIG_UNIX_IFACE #define CONFIG_UNIX_SET +#define CONFIG_UNIX_DONTROUTE #define CONFIG_LINUX_SCAN #define CONFIG_LINUX_MC_MREQ_BIND diff --git a/sysdep/cf/linux-21.h b/sysdep/cf/linux-21.h index 17882c8..57ae796 100644 --- a/sysdep/cf/linux-21.h +++ b/sysdep/cf/linux-21.h @@ -12,6 +12,7 @@ #define CONFIG_UNIX_IFACE #define CONFIG_UNIX_SET +#define CONFIG_UNIX_DONTROUTE #define CONFIG_LINUX_SCAN #define CONFIG_LINUX_MC_MREQN diff --git a/sysdep/cf/linux-22.h b/sysdep/cf/linux-22.h index 52a4681..f362943 100644 --- a/sysdep/cf/linux-22.h +++ b/sysdep/cf/linux-22.h @@ -12,6 +12,7 @@ #define CONFIG_ALL_TABLES_AT_ONCE #define CONFIG_LINUX_MC_MREQN +#define CONFIG_UNIX_DONTROUTE /* Link: sysdep/linux/netlink diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index c3bd5f8..070150f 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -578,8 +578,10 @@ sk_setup(sock *s) WARN("IP_TOS"); if (s->ttl >= 0 && setsockopt(fd, SOL_IP, IP_TTL, &s->ttl, sizeof(s->ttl)) < 0) ERR("IP_TTL"); - //if (s->ttl == 1 && setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &one, sizeof(one)) < 0) - // ERR("SO_DONTROUTE"); +#ifdef CONFIG_UNIX_DONTROUTE + if (s->ttl == 1 && setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &one, sizeof(one)) < 0) + ERR("SO_DONTROUTE"); +#endif #endif err = NULL; bad: |