Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net based on RFC2529, stf(4) should have 1480 as MTU, no...



details:   https://anonhg.NetBSD.org/src/rev/c997d4cca450
branches:  trunk
changeset: 534892:c997d4cca450
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Aug 05 23:37:48 2002 +0000

description:
based on RFC2529, stf(4) should have 1480 as MTU, not 1280.
tron found it, sync w/kame

diffstat:

 sys/net/if_stf.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r d9b4a15e40c6 -r c997d4cca450 sys/net/if_stf.c
--- a/sys/net/if_stf.c  Mon Aug 05 23:30:44 2002 +0000
+++ b/sys/net/if_stf.c  Mon Aug 05 23:37:48 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_stf.c,v 1.26 2002/07/23 06:59:51 tron Exp $ */
+/*     $NetBSD: if_stf.c,v 1.27 2002/08/05 23:37:48 itojun Exp $       */
 /*     $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */
 
 /*
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.26 2002/07/23 06:59:51 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.27 2002/08/05 23:37:48 itojun Exp $");
 
 #include "opt_inet.h"
 
@@ -130,6 +130,8 @@
 #define IN6_IS_ADDR_6TO4(x)    (ntohs((x)->s6_addr16[0]) == 0x2002)
 #define GET_V4(x)      ((struct in_addr *)(&(x)->s6_addr16[1]))
 
+#define STF_MTU                (1500 - 20)
+
 struct stf_softc {
        struct ifnet    sc_if;     /* common area */
        union {
@@ -210,7 +212,7 @@
                return (EIO);   /* XXX */
        }
 
-       sc->sc_if.if_mtu    = IPV6_MMTU;
+       sc->sc_if.if_mtu    = STF_MTU;
        sc->sc_if.if_flags  = 0;
        sc->sc_if.if_ioctl  = stf_ioctl;
        sc->sc_if.if_output = stf_output;
@@ -692,7 +694,7 @@
 {
 
        if (rt)
-               rt->rt_rmx.rmx_mtu = IPV6_MMTU;
+               rt->rt_rmx.rmx_mtu = STF_MTU;
 }
 
 static int



Home | Main Index | Thread Index | Old Index