Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/net Pull up revision 1.27 (requested by martin in t...



details:   https://anonhg.NetBSD.org/src/rev/2b0e3625ee44
branches:  netbsd-1-6
changeset: 529289:2b0e3625ee44
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Nov 06 21:28:47 2002 +0000

description:
Pull up revision 1.27 (requested by martin in ticket #226):
Change default MTU to 1476 (same value that Cisco uses).
Do not limit the MTU when set by the admin with ifconfig, per discussion
on tech-net.
This fixes PR 16761 from Jasper Wallace.

diffstat:

 sys/net/if_gre.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (45 lines):

diff -r 59982dc689d2 -r 2b0e3625ee44 sys/net/if_gre.c
--- a/sys/net/if_gre.c  Wed Nov 06 20:44:59 2002 +0000
+++ b/sys/net/if_gre.c  Wed Nov 06 21:28:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gre.c,v 1.26 2002/02/24 17:22:20 martin Exp $ */
+/*     $NetBSD: if_gre.c,v 1.26.10.1 2002/11/06 21:28:47 tron Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.26 2002/02/24 17:22:20 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.26.10.1 2002/11/06 21:28:47 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -101,13 +101,11 @@
 #include <net/if_gre.h>
 
 /*
- * XXX this is below the standard MTU of
- * 1500 Bytes, allowing for headers,
- * but we should possibly do path mtu discovery
- * before changing if state to up to find the
- * correct value
+ * It is not easy to calculate the right value for a GRE MTU.
+ * We leave this task to the admin and use the same default that
+ * other vendors use.
  */
-#define GREMTU 1450
+#define GREMTU 1476
 #define LINK_MASK (IFF_LINK0|IFF_LINK1|IFF_LINK2)
 
 struct gre_softc_head gre_softc_list;
@@ -401,7 +399,7 @@
        case SIOCSIFMTU:
                if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
                        break;
-               if (ifr->ifr_mtu > GREMTU || ifr->ifr_mtu < 576) {
+               if (ifr->ifr_mtu < 576) {
                        error = EINVAL;
                        break;
                }



Home | Main Index | Thread Index | Old Index