Date: Fri, 29 Jan 2016 00:13:08 +0100 From: Michael Tuexen <tuexen@freebsd.org> To: Oliver Pinter <oliver.pinter@hardenedbsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r294995 - head/sys/netinet Message-ID: <7FF45A03-6FC8-4FFF-94E5-BC6212F5EF02@freebsd.org> In-Reply-To: <CAPQ4ffs9w9Op0uoQ3kPmFw0dNjJMOx4nOb--DXxeYNGnw%2BKOQA@mail.gmail.com> References: <201601281605.u0SG5kYU027051@repo.freebsd.org> <CAPQ4ffs9w9Op0uoQ3kPmFw0dNjJMOx4nOb--DXxeYNGnw%2BKOQA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 28 Jan 2016, at 23:24, Oliver Pinter = <oliver.pinter@hardenedbsd.org> wrote: >=20 > On Thu, Jan 28, 2016 at 5:05 PM, Michael Tuexen <tuexen@freebsd.org> = wrote: >> Author: tuexen >> Date: Thu Jan 28 16:05:46 2016 >> New Revision: 294995 >> URL: https://svnweb.freebsd.org/changeset/base/294995 >>=20 >> Log: >> Always look in the TCP pool. >> This fixes issues with a restarting peer when the listening >> 1-to-1 style socket is closed. >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/sys/netinet/sctp_input.c >> head/sys/netinet/sctp_pcb.c >>=20 >> Modified: head/sys/netinet/sctp_input.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_input.c Thu Jan 28 15:44:14 2016 = (r294994) >> +++ head/sys/netinet/sctp_input.c Thu Jan 28 16:05:46 2016 = (r294995) >> @@ -5688,6 +5688,7 @@ sctp_common_input_processing(struct mbuf >> if (net->port =3D=3D 0) { >> sctp_pathmtu_adjustment(stcb, = net->mtu - sizeof(struct udphdr)); >> } >> +printf("Changing remote encaps port from %u to %u.\n", = ntohs(net->port), ntohs(port)); >=20 > Are these debug printf intended? No. Fixed in https://svnweb.freebsd.org/changeset/base/295021 Thanks for reporting! Best regards Michael >=20 >> net->port =3D port; >> } >> #endif >> @@ -5719,6 +5720,7 @@ sctp_common_input_processing(struct mbuf >> if (net->port =3D=3D 0) { >> sctp_pathmtu_adjustment(stcb, net->mtu - = sizeof(struct udphdr)); >> } >> +printf("Changing remote encaps port from %u to %u.\n", = ntohs(net->port), ntohs(port)); >> net->port =3D port; >> } >> #endif >> @@ -5831,6 +5833,7 @@ sctp_common_input_processing(struct mbuf >> if (net->port =3D=3D 0) { >> sctp_pathmtu_adjustment(stcb, = net->mtu - sizeof(struct udphdr)); >> } >> +printf("Changing remote encaps port from %u to %u.\n", = ntohs(net->port), ntohs(port)); >> net->port =3D port; >> } >> #endif >>=20 >> Modified: head/sys/netinet/sctp_pcb.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_pcb.c Thu Jan 28 15:44:14 2016 = (r294994) >> +++ head/sys/netinet/sctp_pcb.c Thu Jan 28 16:05:46 2016 = (r294995) >> @@ -2256,7 +2256,6 @@ sctp_findassociation_addr(struct mbuf *m >> struct sctphdr *sh, struct sctp_chunkhdr *ch, >> struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t = vrf_id) >> { >> - int find_tcp_pool; >> struct sctp_tcb *stcb; >> struct sctp_inpcb *inp; >>=20 >> @@ -2268,25 +2267,13 @@ sctp_findassociation_addr(struct mbuf *m >> return (stcb); >> } >> } >> - find_tcp_pool =3D 0; >> - /* >> - * Don't consider INIT chunks since that breaks 1-to-1 = sockets: When >> - * a server closes the listener, incoming INIT chunks are not >> - * responsed by an INIT-ACK chunk. >> - */ >> - if ((ch->chunk_type !=3D SCTP_INITIATION_ACK) && >> - (ch->chunk_type !=3D SCTP_COOKIE_ACK) && >> - (ch->chunk_type !=3D SCTP_COOKIE_ECHO)) { >> - /* Other chunk types go to the tcp pool. */ >> - find_tcp_pool =3D 1; >> - } >> if (inp_p) { >> stcb =3D sctp_findassociation_addr_sa(src, dst, inp_p, = netp, >> - find_tcp_pool, vrf_id); >> + 1, vrf_id); >> inp =3D *inp_p; >> } else { >> stcb =3D sctp_findassociation_addr_sa(src, dst, &inp, = netp, >> - find_tcp_pool, vrf_id); >> + 1, vrf_id); >> } >> SCTPDBG(SCTP_DEBUG_PCB1, "stcb:%p inp:%p\n", (void *)stcb, = (void *)inp); >> if (stcb =3D=3D NULL && inp) { >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to = "svn-src-head-unsubscribe@freebsd.org" >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7FF45A03-6FC8-4FFF-94E5-BC6212F5EF02>