Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Aug 2000 18:58:58 +0900 (JST)
From:      yoshiaki@kt.rim.or.jp
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: Kernel build failing in ip6_input.c
Message-ID:  <20000806.185858.59464911.yoshiaki@kt.rim.or.jp>
In-Reply-To: <20000806.165615.74752860.yoshiaki@kt.rim.or.jp>
References:  <200008060450.EAA44099@hun.org>

next in thread | previous in thread | raw e-mail | index | archive | help

>>>>> From: attila! <attila@hun.org>
>>>>> Date: Sun, 6 Aug 2000 04:50:06 GMT

 > on Sat, 5 Aug 2000 20:49:21 -0300 (ADT),
 > 	Brandon Hume <hume@Den.BOFH.Halifax.NS.Ca> wrote:
 > 
 > > I went about a week without updating my source tree, but yesterday when I
 > > went to build a kernel (and day), I get the following:
 > > ...
 > > cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include opt_global.h -elf  -mpreferred-stack-boundary=2  ../../netinet6/ip6_input.c
 > > ../../netinet6/ip6_input.c: In function `ip6_input':
 > > ../../netinet6/ip6_input.c:312: `inetsw' undeclared (first use in this
 > > function)
 > > ../../netinet6/ip6_input.c:312: (Each undeclared identifier is reported only once
 > > ../../netinet6/ip6_input.c:312: for each function it appears in.)
 > > ../../netinet6/ip6_input.c:312: `ip_protox' undeclared (first use in this function)
 > > *** Error code 1
 > > <snip>
 > >

This error is generated that I use IPFILTER and INET6 with
configuration file.

This is my dirty hack.
This code does not do a check of action of IPv6.

--- ../ip6_input.c	Mon Jul 31 22:11:42 2000
+++ ip6_input.c	Sun Aug  6 16:39:33 2000
@@ -309,7 +309,7 @@
 	 * in the list may have previously cleared it.
 	 */
 	m0 = m;
-	pfh = pfil_hook_get(PFIL_IN, &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh);
+	pfh = pfil_hook_get(PFIL_IN, &inet6sw[ip6_protox[IPPROTO_IPV6]].pr_pfh);
 	for (; pfh; pfh = pfh->pfil_link.tqe_next)
 		if (pfh->pfil_func) {
 			rv = pfh->pfil_func(ip6, sizeof(*ip6),

--- ../ip6_output.c	Mon Jul 31 22:11:42 2000
+++ ip6_output.c	Sun Aug  6 16:39:40 2000
@@ -110,6 +110,8 @@
 #include <netinet6/ip6_fw.h>
 #endif
 
+#include <netinet6/ip6protosw.h>
+
 static MALLOC_DEFINE(M_IPMOPTS, "ip6_moptions", "internet multicast options");
 
 struct ip6_exthdrs {
@@ -130,6 +132,9 @@
 static int ip6_insert_jumboopt __P((struct ip6_exthdrs *, u_int32_t));
 static int ip6_splithdr __P((struct mbuf *, struct ip6_exthdrs *));
 
+extern struct ip6protosw inet6sw[];
+extern u_char ip6_protox[IPPROTO_MAX];
+
 /*
  * IP6 output. The packet in mbuf chain m contains a skeletal IP6
  * header (with pri, len, nxt, hlim, src, dst).
@@ -854,7 +859,7 @@
 	 * Run through list of hooks for output packets.
 	 */
 	m1 = m;
-	pfh = pfil_hook_get(PFIL_OUT, &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh);
+	pfh = pfil_hook_get(PFIL_OUT, &inet6sw[ip6_protox[IPPROTO_IPV6]].pr_pfh);
 	for (; pfh; pfh = pfh->pfil_link.tqe_next)
 		if (pfh->pfil_func) {
 			rv = pfh->pfil_func(ip6, sizeof(*ip6), ifp, 1, &m1);

---
  yoshiaki@kt.rim.or.jp
  yoshiaki@jp.freebsd.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000806.185858.59464911.yoshiaki>