Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Sep 2001 13:16:43 +0900 (JST)
From:      SUMIKAWA Munechika <sumikawa@ebina.hitachi.co.jp>
To:        julian@elischer.org
Cc:        keiichi@iij.ad.jp, itojun@iijlab.net, net@FreeBSD.ORG, users@ipv6.org, core@kame.net, sumikawa@ebina.hitachi.co.jp
Subject:   Re: IPV6/KAME/protosw integration cleanup
Message-ID:  <20010905.131643.15831593.sumikawa@ebina.hitachi.co.jp>
In-Reply-To: <3B95A0BE.9F2BEC4D@elischer.org>
References:  <87sne3y0bq.wl@keiichi00.osaka.iij.ad.jp> <86ae0afhaf.wl@keiichi01.osaka.iij.ad.jp> <3B95A0BE.9F2BEC4D@elischer.org>

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

> Also, there was some code in the previous patch from KAME that had
> some confusion.  at the bottom of encap4_input()

> can you let me know what the correct cod eshould look like..
> (keeping in mind that ipip_input() just calls rip_input() and that
> ipip_input is not compiled by default in LINT so lint failed to
> compile as it was.)

I've sent the following mail to you. I'll commit my patch later.

---
Munechika SUMIKAWA @ KAME Project / FreeBSD.org

----------------------------------------------------------------
Subject: Re: cvs commit: src/sys/netinet ip_encap.c
From: Munechika Sumikawa <sumikawa@FreeBSD.org>
To: julian@elischer.org
Cc: sumikawa@FreeBSD.org
Date: Tue, 04 Sep 2001 15:03:14 +0900 (JST)
X-Mailer: xcite1.39> Mew version 2.0 on XEmacs 21.4.3 (Academic Rigor)

> It didn't compile in LINT?
> 
> what is supposed to be called? previously the code was:
> if ipv4
>  call rip_input
> else
>  call rip_input
> 
> except that it called rip_input via ipip_input() 
> which is not compiled in LINT (I haven't worked out why yet)
> 
> the only sense I could see was maybe to cut off the header and
> submit the ipv4 packet to ip_input.
> 
> I'm happy to change it if I can figure out what it's trying to do.

I see.  I am also wrong. 

ip_mroute.c:ipip_input() was removed in rev 1.64 and use ip_encap.c's
encapsulation support so we don't need to provide last resort codes
anymore.

unregisterd tunneled packets must be discarded from security point
and just toss them up to applications if they listen raw packets.

I believe the below patch makes us happy.  removing ipip_input() was
introduced only in -cuurennt so it's not need to MFC.

Thanks,

---
Munechika SUMIKAWA @ KAME Project / FreeBSD.org

Index: ip_encap.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_encap.c,v
retrieving revision 1.8
diff -u -r1.8 ip_encap.c
--- ip_encap.c	2001/09/03 21:07:31	1.8
+++ ip_encap.c	2001/09/04 05:59:26
@@ -73,7 +73,6 @@
 #include <net/route.h>
 
 #include <netinet/in.h>
-#include <netinet/in_var.h>
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
@@ -211,20 +210,6 @@
 			(*psw->pr_input)(m, off);
 		} else
 			m_freem(m);
-		return;
-	}
-
-	/* for backward compatibility - messy... */
-	/* XXX
-	 * I THINK they meant to call ip_input()
-	 * The original code called ipip_input()
-	 * which just calls rip_input()
-	 * which makes no sense.
-	 * (It is also not compiled in in LINT)
-	 */
-	if (proto == IPPROTO_IPV4) {
-		m_adj(m, off);
-		ip_input(m/*, off */);
 		return;
 	}
 

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




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