aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>2000-02-10 19:33:58 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>2000-02-10 19:33:58 +0000
commit1aa540eb03e47cadbf484f0aade4d882361b7779 (patch)
tree5a7a584944ca8511d709b18349f29f84a44826fe /usr.sbin
parent5bdee2c5d5f7d833350fb941e3836b1e9f95e691 (diff)
downloadsrc-1aa540eb03e47cadbf484f0aade4d882361b7779.tar.gz
src-1aa540eb03e47cadbf484f0aade4d882361b7779.zip
Forbid include of soem inet6 header files from wrong place
KAME put INET6 related stuff into sys/netinet6 dir, but IPv6 standard API(RFC2553) require following files to be under sys/netinet. netinet/ip6.h netinet/icmp6.h Now those header files just include each following files. netinet6/ip6.h netinet6/icmp6.h Also KAME has netinet6/in6.h for easy INET6 common defs sharing between different BSDs, but RFC2553 requires only netinet/in.h should be included from userland. So netinet/in.h also includes netinet6/in6.h inside. To keep apps portability, apps should not directly include above files from netinet6 dir. Ideally, all contents of, netinet6/ip6.h netinet6/icmp6.h netinet6/in6.h should be moved into netinet/ip6.h netinet/icmp6.h netinet/in.h but to avoid big changes in this stage, add some hack, that -Put some special macro define into those files under neitnet -Let files under netinet6 cause error if it is included from some apps, and, if the specifal macro define is not defined. (which should have been defined if files under netinet is included) -And let them print an error message which tells the correct name of the include file to be included. Also fix apps which includes invalid header files. Approved by: jkh Obtained from: KAME project
Notes
Notes: svn path=/head/; revision=57120
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rtadvd/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 30551614e828..0e5f80d0633a 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -41,9 +41,9 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
-#include <netinet6/ip6.h>
+#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
-#include <netinet6/icmp6.h>
+#include <netinet/icmp6.h>
#include <arpa/inet.h>