Tue May 29 16:21:30 2018 UTC ()
Remove dead code, we don't care.


(maxv)
diff -r1.209 -r1.210 src/sys/netinet6/ip6_output.c

cvs diff -r1.209 -r1.210 src/sys/netinet6/ip6_output.c (expand / switch to unified diff)

--- src/sys/netinet6/ip6_output.c 2018/05/09 06:35:10 1.209
+++ src/sys/netinet6/ip6_output.c 2018/05/29 16:21:30 1.210
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ip6_output.c,v 1.209 2018/05/09 06:35:10 maxv Exp $ */ 1/* $NetBSD: ip6_output.c,v 1.210 2018/05/29 16:21:30 maxv Exp $ */
2/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ 2/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
3 3
4/* 4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -52,27 +52,27 @@ @@ -52,27 +52,27 @@
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * SUCH DAMAGE. 59 * SUCH DAMAGE.
60 * 60 *
61 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 61 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94
62 */ 62 */
63 63
64#include <sys/cdefs.h> 64#include <sys/cdefs.h>
65__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.209 2018/05/09 06:35:10 maxv Exp $"); 65__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.210 2018/05/29 16:21:30 maxv Exp $");
66 66
67#ifdef _KERNEL_OPT 67#ifdef _KERNEL_OPT
68#include "opt_inet.h" 68#include "opt_inet.h"
69#include "opt_inet6.h" 69#include "opt_inet6.h"
70#include "opt_ipsec.h" 70#include "opt_ipsec.h"
71#endif 71#endif
72 72
73#include <sys/param.h> 73#include <sys/param.h>
74#include <sys/malloc.h> 74#include <sys/malloc.h>
75#include <sys/mbuf.h> 75#include <sys/mbuf.h>
76#include <sys/errno.h> 76#include <sys/errno.h>
77#include <sys/socket.h> 77#include <sys/socket.h>
78#include <sys/socketvar.h> 78#include <sys/socketvar.h>
@@ -865,53 +865,30 @@ ip6_output( @@ -865,53 +865,30 @@ ip6_output(
865 in6_ifstat_inc(ifp, ifs6_out_fragfail); 865 in6_ifstat_inc(ifp, ifs6_out_fragfail);
866 goto bad; 866 goto bad;
867 } else if (ip6->ip6_plen == 0) { 867 } else if (ip6->ip6_plen == 0) {
868 /* jumbo payload cannot be fragmented */ 868 /* jumbo payload cannot be fragmented */
869 error = EMSGSIZE; 869 error = EMSGSIZE;
870 in6_ifstat_inc(ifp, ifs6_out_fragfail); 870 in6_ifstat_inc(ifp, ifs6_out_fragfail);
871 goto bad; 871 goto bad;
872 } else { 872 } else {
873 const u_int32_t id = htonl(ip6_randomid()); 873 const u_int32_t id = htonl(ip6_randomid());
874 struct mbuf **mnext, *m_frgpart; 874 struct mbuf **mnext, *m_frgpart;
875 const int hlen = unfragpartlen; 875 const int hlen = unfragpartlen;
876 struct ip6_frag *ip6f; 876 struct ip6_frag *ip6f;
877 u_char nextproto; 877 u_char nextproto;
878#if 0 /* see below */ 
879 struct ip6ctlparam ip6cp; 
880 u_int32_t mtu32; 
881#endif 
882 878
883 if (mtu > IPV6_MAXPACKET) 879 if (mtu > IPV6_MAXPACKET)
884 mtu = IPV6_MAXPACKET; 880 mtu = IPV6_MAXPACKET;
885 881
886#if 0 
887 /* 
888 * It is believed this code is a leftover from the 
889 * development of the IPV6_RECVPATHMTU sockopt and 
890 * associated work to implement RFC3542. 
891 * It's not entirely clear what the intent of the API 
892 * is at this point, so disable this code for now. 
893 * The IPV6_RECVPATHMTU sockopt and/or IPV6_DONTFRAG 
894 * will send notifications if the application requests. 
895 */ 
896 
897 /* Notify a proper path MTU to applications. */ 
898 mtu32 = (u_int32_t)mtu; 
899 memset(&ip6cp, 0, sizeof(ip6cp)); 
900 ip6cp.ip6c_cmdarg = (void *)&mtu32; 
901 pfctlinput2(PRC_MSGSIZE, 
902 rtcache_getdst(ro_pmtu), &ip6cp); 
903#endif 
904 
905 /* 882 /*
906 * Must be able to put at least 8 bytes per fragment. 883 * Must be able to put at least 8 bytes per fragment.
907 */ 884 */
908 len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; 885 len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7;
909 if (len < 8) { 886 if (len < 8) {
910 error = EMSGSIZE; 887 error = EMSGSIZE;
911 in6_ifstat_inc(ifp, ifs6_out_fragfail); 888 in6_ifstat_inc(ifp, ifs6_out_fragfail);
912 goto bad; 889 goto bad;
913 } 890 }
914 891
915 mnext = &m->m_nextpkt; 892 mnext = &m->m_nextpkt;
916 893
917 /* 894 /*