From owner-svn-src-stable-10@FreeBSD.ORG Fri Aug 22 19:37:52 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29F64AB; Fri, 22 Aug 2014 19:37:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149C43B57; Fri, 22 Aug 2014 19:37:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MJbpNc020833; Fri, 22 Aug 2014 19:37:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MJboa3020827; Fri, 22 Aug 2014 19:37:50 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201408221937.s7MJboa3020827@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 22 Aug 2014 19:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270350 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 19:37:52 -0000 Author: tuexen Date: Fri Aug 22 19:37:50 2014 New Revision: 270350 URL: http://svnweb.freebsd.org/changeset/base/270350 Log: MFC r268526: Integrate upstream changes. Modified: stable/10/sys/netinet/sctp_input.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_sysctl.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_input.c ============================================================================== --- stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_input.c Fri Aug 22 19:37:50 2014 (r270350) @@ -47,7 +47,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #include @@ -5603,12 +5605,14 @@ sctp_common_input_processing(struct mbuf calc_check, check, (void *)m, length, iphlen); stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); +#if defined(INET) || defined(INET6) if ((net != NULL) && (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif if ((net != NULL) && (use_mflowid != 0)) { net->flowid = mflowid; #ifdef INVARIANTS @@ -5634,12 +5638,14 @@ sctp_common_input_processing(struct mbuf } stcb = sctp_findassociation_addr(m, offset, src, dst, sh, ch, &inp, &net, vrf_id); +#if defined(INET) || defined(INET6) if ((net != NULL) && (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif if ((net != NULL) && (use_mflowid != 0)) { net->flowid = mflowid; #ifdef INVARIANTS @@ -5748,12 +5754,14 @@ sctp_common_input_processing(struct mbuf * it changes our INP. */ inp = stcb->sctp_ep; +#if defined(INET) || defined(INET6) if ((net) && (port)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } net->port = port; } +#endif } } else { /* Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_output.c Fri Aug 22 19:37:50 2014 (r270350) @@ -50,7 +50,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #include #include @@ -10964,13 +10966,14 @@ sctp_send_resp_msg(struct sockaddr *src, struct mbuf *mout; struct sctphdr *shout; struct sctp_chunkhdr *ch; - struct udphdr *udp; - int len, cause_len, padding_len; #if defined(INET) || defined(INET6) + struct udphdr *udp; int ret; #endif + int len, cause_len, padding_len; + #ifdef INET struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; @@ -11021,9 +11024,11 @@ sctp_send_resp_msg(struct sockaddr *src, default: break; } +#if defined(INET) || defined(INET6) if (port) { len += sizeof(struct udphdr); } +#endif mout = sctp_get_mbuf_for_msg(len + max_linkhdr, 1, M_NOWAIT, 1, MT_DATA); if (mout == NULL) { if (cause) { @@ -11094,6 +11099,7 @@ sctp_send_resp_msg(struct sockaddr *src, shout = mtod(mout, struct sctphdr *); break; } +#if defined(INET) || defined(INET6) if (port) { if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { sctp_m_freem(mout); @@ -11112,6 +11118,7 @@ sctp_send_resp_msg(struct sockaddr *src, } else { udp = NULL; } +#endif shout->src_port = sh->dest_port; shout->dest_port = sh->src_port; shout->checksum = 0; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_pcb.c Fri Aug 22 19:37:50 2014 (r270350) @@ -46,7 +46,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif #ifdef INET6 #include #endif @@ -4007,9 +4009,11 @@ sctp_add_remote_addr(struct sctp_tcb *st break; } } +#if defined(INET) || defined(INET6) if (net->port) { net->mtu -= (uint32_t) sizeof(struct udphdr); } +#endif if (from == SCTP_ALLOC_ASOC) { stcb->asoc.smallest_mtu = net->mtu; } Modified: stable/10/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_sysctl.c Fri Aug 22 19:37:50 2014 (r270350) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); void sctp_init_sysctls() { + printf("sctp_init_sysctls().\n"); SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT; SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT; SCTP_BASE_SYSCTL(sctp_auto_asconf) = SCTPCTL_AUTOASCONF_DEFAULT; @@ -125,6 +126,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly) = SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT; #if defined(SCTP_DEBUG) SCTP_BASE_SYSCTL(sctp_debug_on) = SCTPCTL_DEBUG_DEFAULT; +printf("debug = %d.\n", SCTP_BASE_SYSCTL(sctp_debug_on)); #endif #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_BASE_SYSCTL(sctp_output_unlocked) = SCTPCTL_OUTPUT_UNLOCKED_DEFAULT; Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_timer.c Fri Aug 22 19:37:50 2014 (r270350) @@ -49,7 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(INET) || defined(INET6) #include +#endif void @@ -1480,9 +1482,11 @@ sctp_pathmtu_timer(struct sctp_inpcb *in } if (net->ro._s_addr) { mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_rt); +#if defined(INET) || defined(INET6) if (net->port) { mtu -= sizeof(struct udphdr); } +#endif if (mtu > next_mtu) { net->mtu = next_mtu; } Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:23:38 2014 (r270349) +++ stable/10/sys/netinet/sctp_usrreq.c Fri Aug 22 19:37:50 2014 (r270350) @@ -214,8 +214,6 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, SCTP_TCB_UNLOCK(stcb); } -#endif - void sctp_notify(struct sctp_inpcb *inp, struct ip *ip, @@ -302,6 +300,8 @@ sctp_notify(struct sctp_inpcb *inp, } } +#endif + #ifdef INET void sctp_ctlinput(cmd, sa, vip)