Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/netinet6 Pullup rev 1.83 (requested by itojun in ti...



details:   https://anonhg.NetBSD.org/src/rev/7e3fc79b2742
branches:  netbsd-1-6
changeset: 531388:7e3fc79b2742
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Jun 14 02:47:57 2004 +0000

description:
Pullup rev 1.83 (requested by itojun in ticket #1709)

Implement IPV6_USE_MIN_MTU sockopt.

diffstat:

 sys/netinet6/ip6_output.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r 73e5ec0d7f92 -r 7e3fc79b2742 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Mon Jun 14 02:47:52 2004 +0000
+++ b/sys/netinet6/ip6_output.c Mon Jun 14 02:47:57 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.44.4.4 2004/02/07 20:06:04 jmc Exp $  */
+/*     $NetBSD: ip6_output.c,v 1.44.4.5 2004/06/14 02:47:57 jmc Exp $  */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.44.4.4 2004/02/07 20:06:04 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.44.4.5 2004/06/14 02:47:57 jmc Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1348,6 +1348,7 @@
                        case IPV6_RTHDR:
                        case IPV6_FAITH:
                        case IPV6_V6ONLY:
+                       case IPV6_USE_MIN_MTU:
                                if (!m || m->m_len != sizeof(int)) {
                                        error = EINVAL;
                                        break;
@@ -1405,6 +1406,10 @@
                                        OPTSET(IN6P_FAITH);
                                        break;
 
+                               case IPV6_USE_MIN_MTU:
+                                       OPTSET(IN6P_MINMTU);
+                                       break;
+
                                case IPV6_V6ONLY:
                                        /*
                                         * make setsockopt(IPV6_V6ONLY)
@@ -1537,6 +1542,7 @@
                        case IPV6_RTHDR:
                        case IPV6_FAITH:
                        case IPV6_V6ONLY:
+                       case IPV6_USE_MIN_MTU:
                                *mp = m = m_get(M_WAIT, MT_SOOPTS);
                                m->m_len = sizeof(int);
                                switch (optname) {
@@ -1599,6 +1605,10 @@
                                case IPV6_V6ONLY:
                                        optval = OPTBIT(IN6P_IPV6_V6ONLY);
                                        break;
+
+                               case IPV6_USE_MIN_MTU:
+                                       optval = OPTBIT(IN6P_MINMTU);
+                                       break;
                                }
                                *mtod(m, int *) = optval;
                                break;



Home | Main Index | Thread Index | Old Index