Deleted Added
full compact
sctp_output.c (170174) sctp_output.c (170181)
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 170174 2007-06-01 01:12:45Z jeff $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 170181 2007-06-01 11:19:54Z rrs $");
35
36#include <netinet/sctp_os.h>
37#include <sys/proc.h>
38#include <netinet/sctp_var.h>
39#include <netinet/sctp_sysctl.h>
40#include <netinet/sctp_header.h>
41#include <netinet/sctp_pcb.h>
42#include <netinet/sctputil.h>

--- 2901 unchanged lines hidden (view full) ---

2944 * or G. We should prefer G -> G and P -> P if possible. Then as a
2945 * secondary fall back to mixed types G->P being a last ditch one. -
2946 * The above all works for bound all, but bound specific we need to
2947 * use the same concept but instead only consider the bound
2948 * addresses. If the bound set is NOT assigned to the interface then
2949 * we must use rotation amongst the bound addresses..
2950 */
2951 if (ro->ro_rt == NULL) {
35
36#include <netinet/sctp_os.h>
37#include <sys/proc.h>
38#include <netinet/sctp_var.h>
39#include <netinet/sctp_sysctl.h>
40#include <netinet/sctp_header.h>
41#include <netinet/sctp_pcb.h>
42#include <netinet/sctputil.h>

--- 2901 unchanged lines hidden (view full) ---

2944 * or G. We should prefer G -> G and P -> P if possible. Then as a
2945 * secondary fall back to mixed types G->P being a last ditch one. -
2946 * The above all works for bound all, but bound specific we need to
2947 * use the same concept but instead only consider the bound
2948 * addresses. If the bound set is NOT assigned to the interface then
2949 * we must use rotation amongst the bound addresses..
2950 */
2951 if (ro->ro_rt == NULL) {
2952 uint32_t table_id = 0;
2953
2954 /*
2955 * Need a route to cache.
2956 */
2952 /*
2953 * Need a route to cache.
2954 */
2957 if (stcb) {
2958 table_id = stcb->asoc.table_id;
2959 } else {
2960 table_id = SCTP_VRF_DEFAULT_TABLEID(vrf_id);
2961 }
2962 SCTP_RTALLOC(ro, vrf_id, table_id);
2955 SCTP_RTALLOC(ro, vrf_id);
2963 }
2964 if (ro->ro_rt == NULL) {
2965 return (NULL);
2966 }
2967 fam = to->sin_family;
2968 dest_is_priv = dest_is_loop = 0;
2969 /* Setup our scopes for the destination */
2970 if (fam == AF_INET) {

--- 493 unchanged lines hidden (view full) ---

3464 return (ENOMEM);
3465 }
3466#ifdef SCTP_PACKET_LOGGING
3467 sctp_packet_log(m, packet_length);
3468#endif
3469 SCTP_ATTACH_CHAIN(o_pak, m, packet_length);
3470
3471 /* send it out. table id is taken from stcb */
2956 }
2957 if (ro->ro_rt == NULL) {
2958 return (NULL);
2959 }
2960 fam = to->sin_family;
2961 dest_is_priv = dest_is_loop = 0;
2962 /* Setup our scopes for the destination */
2963 if (fam == AF_INET) {

--- 493 unchanged lines hidden (view full) ---

3457 return (ENOMEM);
3458 }
3459#ifdef SCTP_PACKET_LOGGING
3460 sctp_packet_log(m, packet_length);
3461#endif
3462 SCTP_ATTACH_CHAIN(o_pak, m, packet_length);
3463
3464 /* send it out. table id is taken from stcb */
3472 SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id, 0);
3465 SCTP_IP_OUTPUT(ret, o_pak, ro, stcb, vrf_id);
3473
3474 SCTP_STAT_INCR(sctps_sendpackets);
3475 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
3476 if (ret)
3477 SCTP_STAT_INCR(sctps_senderrors);
3478
3479 SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret);
3480 if (net == NULL) {

--- 200 unchanged lines hidden (view full) ---

3681 }
3682#ifdef SCTP_PACKET_LOGGING
3683 sctp_packet_log(m, packet_length);
3684#endif
3685 SCTP_ATTACH_CHAIN(o_pak, m, packet_length);
3686
3687 /* send it out. table id is taken from stcb */
3688 SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp,
3466
3467 SCTP_STAT_INCR(sctps_sendpackets);
3468 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
3469 if (ret)
3470 SCTP_STAT_INCR(sctps_senderrors);
3471
3472 SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret);
3473 if (net == NULL) {

--- 200 unchanged lines hidden (view full) ---

3674 }
3675#ifdef SCTP_PACKET_LOGGING
3676 sctp_packet_log(m, packet_length);
3677#endif
3678 SCTP_ATTACH_CHAIN(o_pak, m, packet_length);
3679
3680 /* send it out. table id is taken from stcb */
3681 SCTP_IP6_OUTPUT(ret, o_pak, (struct route_in6 *)ro, &ifp,
3689 stcb, vrf_id, 0);
3682 stcb, vrf_id);
3690
3691 if (net) {
3692 /* for link local this must be done */
3693 sin6->sin6_scope_id = prev_scope;
3694 sin6->sin6_port = prev_port;
3695 }
3696 SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
3697 SCTP_STAT_INCR(sctps_sendpackets);

--- 780 unchanged lines hidden (view full) ---

4478 * Given a MBUF chain that was sent into us containing an INIT. Build a
4479 * INIT-ACK with COOKIE and send back. We assume that the in_initpkt has done
4480 * a pullup to include IPv6/4header, SCTP header and initial part of INIT
4481 * message (i.e. the struct sctp_init_msg).
4482 */
4483void
4484sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
4485 struct mbuf *init_pkt, int iphlen, int offset, struct sctphdr *sh,
3683
3684 if (net) {
3685 /* for link local this must be done */
3686 sin6->sin6_scope_id = prev_scope;
3687 sin6->sin6_port = prev_port;
3688 }
3689 SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
3690 SCTP_STAT_INCR(sctps_sendpackets);

--- 780 unchanged lines hidden (view full) ---

4471 * Given a MBUF chain that was sent into us containing an INIT. Build a
4472 * INIT-ACK with COOKIE and send back. We assume that the in_initpkt has done
4473 * a pullup to include IPv6/4header, SCTP header and initial part of INIT
4474 * message (i.e. the struct sctp_init_msg).
4475 */
4476void
4477sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
4478 struct mbuf *init_pkt, int iphlen, int offset, struct sctphdr *sh,
4486 struct sctp_init_chunk *init_chk, uint32_t vrf_id, uint32_t table_id)
4479 struct sctp_init_chunk *init_chk, uint32_t vrf_id)
4487{
4488 struct sctp_association *asoc;
4489 struct mbuf *m, *m_at, *m_tmp, *m_cookie, *op_err, *mp_last;
4490 struct sctp_init_msg *initackm_out;
4491 struct sctp_ecn_supported_param *ecn;
4492 struct sctp_prsctp_supported_param *prsctp;
4493 struct sctp_ecn_nonce_supported_param *ecn_nonce;
4494 struct sctp_supported_chunk_types_param *pr_supported;

--- 21 unchanged lines hidden (view full) ---

4516 (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) &&
4517 (sctp_are_there_new_addresses(asoc, init_pkt, iphlen, offset))) {
4518 /* new addresses, out of here in non-cookie-wait states */
4519 /*
4520 * Send a ABORT, we don't add the new address error clause
4521 * though we even set the T bit and copy in the 0 tag.. this
4522 * looks no different than if no listener was present.
4523 */
4480{
4481 struct sctp_association *asoc;
4482 struct mbuf *m, *m_at, *m_tmp, *m_cookie, *op_err, *mp_last;
4483 struct sctp_init_msg *initackm_out;
4484 struct sctp_ecn_supported_param *ecn;
4485 struct sctp_prsctp_supported_param *prsctp;
4486 struct sctp_ecn_nonce_supported_param *ecn_nonce;
4487 struct sctp_supported_chunk_types_param *pr_supported;

--- 21 unchanged lines hidden (view full) ---

4509 (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) &&
4510 (sctp_are_there_new_addresses(asoc, init_pkt, iphlen, offset))) {
4511 /* new addresses, out of here in non-cookie-wait states */
4512 /*
4513 * Send a ABORT, we don't add the new address error clause
4514 * though we even set the T bit and copy in the 0 tag.. this
4515 * looks no different than if no listener was present.
4516 */
4524 sctp_send_abort(init_pkt, iphlen, sh, 0, NULL, vrf_id,
4525 table_id);
4517 sctp_send_abort(init_pkt, iphlen, sh, 0, NULL, vrf_id);
4526 return;
4527 }
4528 abort_flag = 0;
4529 op_err = sctp_arethere_unrecognized_parameters(init_pkt,
4530 (offset + sizeof(struct sctp_init_chunk)),
4531 &abort_flag, (struct sctp_chunkhdr *)init_chk);
4532 if (abort_flag) {
4533 sctp_send_abort(init_pkt, iphlen, sh,
4518 return;
4519 }
4520 abort_flag = 0;
4521 op_err = sctp_arethere_unrecognized_parameters(init_pkt,
4522 (offset + sizeof(struct sctp_init_chunk)),
4523 &abort_flag, (struct sctp_chunkhdr *)init_chk);
4524 if (abort_flag) {
4525 sctp_send_abort(init_pkt, iphlen, sh,
4534 init_chk->init.initiate_tag, op_err, vrf_id,
4535 table_id);
4526 init_chk->init.initiate_tag, op_err, vrf_id);
4536 return;
4537 }
4538 m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
4539 if (m == NULL) {
4540 /* No memory, INIT timer will re-attempt. */
4541 if (op_err)
4542 sctp_m_freem(op_err);
4543 return;

--- 4703 unchanged lines hidden (view full) ---

9247 (struct sockaddr *)&net->ro._l_addr,
9248 m_shutdown_comp, 0, NULL, 1, 0, NULL, 0);
9249 SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
9250 return;
9251}
9252
9253void
9254sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
4527 return;
4528 }
4529 m = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_DONTWAIT, 1, MT_DATA);
4530 if (m == NULL) {
4531 /* No memory, INIT timer will re-attempt. */
4532 if (op_err)
4533 sctp_m_freem(op_err);
4534 return;

--- 4703 unchanged lines hidden (view full) ---

9238 (struct sockaddr *)&net->ro._l_addr,
9239 m_shutdown_comp, 0, NULL, 1, 0, NULL, 0);
9240 SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
9241 return;
9242}
9243
9244void
9245sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
9255 uint32_t vrf_id, uint32_t table_id)
9246 uint32_t vrf_id)
9256{
9257 /* formulate and SEND a SHUTDOWN-COMPLETE */
9258 struct mbuf *o_pak;
9259 struct mbuf *mout;
9260 struct ip *iph, *iph_out;
9261 struct ip6_hdr *ip6, *ip6_out;
9262 int offset_out, len, mlen;
9263 struct sctp_shutdown_complete_msg *comp_cp;

--- 86 unchanged lines hidden (view full) ---

9350 /* set IPv4 length */
9351 iph_out->ip_len = mlen;
9352#ifdef SCTP_PACKET_LOGGING
9353 sctp_packet_log(mout, mlen);
9354#endif
9355 SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
9356
9357 /* out it goes */
9247{
9248 /* formulate and SEND a SHUTDOWN-COMPLETE */
9249 struct mbuf *o_pak;
9250 struct mbuf *mout;
9251 struct ip *iph, *iph_out;
9252 struct ip6_hdr *ip6, *ip6_out;
9253 int offset_out, len, mlen;
9254 struct sctp_shutdown_complete_msg *comp_cp;

--- 86 unchanged lines hidden (view full) ---

9341 /* set IPv4 length */
9342 iph_out->ip_len = mlen;
9343#ifdef SCTP_PACKET_LOGGING
9344 sctp_packet_log(mout, mlen);
9345#endif
9346 SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
9347
9348 /* out it goes */
9358 SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id, table_id);
9349 SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id);
9359
9360 /* Free the route if we got one back */
9361 if (ro.ro_rt)
9362 RTFREE(ro.ro_rt);
9363 } else if (ip6_out != NULL) {
9364 struct route_in6 ro;
9365 int ret;
9366 struct sctp_tcb *stcb = NULL;
9367 struct ifnet *ifp = NULL;
9368
9369 bzero(&ro, sizeof(ro));
9370 mlen = SCTP_BUF_LEN(mout);
9371#ifdef SCTP_PACKET_LOGGING
9372 sctp_packet_log(mout, mlen);
9373#endif
9374 SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
9350
9351 /* Free the route if we got one back */
9352 if (ro.ro_rt)
9353 RTFREE(ro.ro_rt);
9354 } else if (ip6_out != NULL) {
9355 struct route_in6 ro;
9356 int ret;
9357 struct sctp_tcb *stcb = NULL;
9358 struct ifnet *ifp = NULL;
9359
9360 bzero(&ro, sizeof(ro));
9361 mlen = SCTP_BUF_LEN(mout);
9362#ifdef SCTP_PACKET_LOGGING
9363 sctp_packet_log(mout, mlen);
9364#endif
9365 SCTP_ATTACH_CHAIN(o_pak, mout, mlen);
9375 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
9366 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
9376
9377 /* Free the route if we got one back */
9378 if (ro.ro_rt)
9379 RTFREE(ro.ro_rt);
9380 }
9381 SCTP_STAT_INCR(sctps_sendpackets);
9382 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
9383 SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);

--- 702 unchanged lines hidden (view full) ---

10086 sctp_next);
10087 asoc->ctrl_queue_cnt++;
10088 sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo);
10089 return (0);
10090}
10091
10092void
10093sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
9367
9368 /* Free the route if we got one back */
9369 if (ro.ro_rt)
9370 RTFREE(ro.ro_rt);
9371 }
9372 SCTP_STAT_INCR(sctps_sendpackets);
9373 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
9374 SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);

--- 702 unchanged lines hidden (view full) ---

10077 sctp_next);
10078 asoc->ctrl_queue_cnt++;
10079 sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo);
10080 return (0);
10081}
10082
10083void
10084sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag,
10094 struct mbuf *err_cause, uint32_t vrf_id, uint32_t table_id)
10085 struct mbuf *err_cause, uint32_t vrf_id)
10095{
10096 /*-
10097 * Formulate the abort message, and send it back down.
10098 */
10099 struct mbuf *o_pak;
10100 struct mbuf *mout;
10101 struct sctp_abort_msg *abm;
10102 struct ip *iph, *iph_out;

--- 116 unchanged lines hidden (view full) ---

10219 SCTPDBG_PKT(SCTP_DEBUG_OUTPUT2, iph_out, &abm->sh);
10220 /* set IPv4 length */
10221 iph_out->ip_len = len;
10222 /* out it goes */
10223#ifdef SCTP_PACKET_LOGGING
10224 sctp_packet_log(mout, len);
10225#endif
10226 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10086{
10087 /*-
10088 * Formulate the abort message, and send it back down.
10089 */
10090 struct mbuf *o_pak;
10091 struct mbuf *mout;
10092 struct sctp_abort_msg *abm;
10093 struct ip *iph, *iph_out;

--- 116 unchanged lines hidden (view full) ---

10210 SCTPDBG_PKT(SCTP_DEBUG_OUTPUT2, iph_out, &abm->sh);
10211 /* set IPv4 length */
10212 iph_out->ip_len = len;
10213 /* out it goes */
10214#ifdef SCTP_PACKET_LOGGING
10215 sctp_packet_log(mout, len);
10216#endif
10217 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10227 SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id, table_id);
10218 SCTP_IP_OUTPUT(ret, o_pak, &ro, stcb, vrf_id);
10228
10229 /* Free the route if we got one back */
10230 if (ro.ro_rt)
10231 RTFREE(ro.ro_rt);
10232 } else if (ip6_out != NULL) {
10233 struct route_in6 ro;
10234 int ret;
10235 struct sctp_tcb *stcb = NULL;
10236 struct ifnet *ifp = NULL;
10237
10238 /* zap the stack pointer to the route */
10239 bzero(&ro, sizeof(ro));
10240 SCTPDBG(SCTP_DEBUG_OUTPUT2, "sctp_send_abort calling ip6_output:\n");
10241 SCTPDBG_PKT(SCTP_DEBUG_OUTPUT2, (struct ip *)ip6_out, &abm->sh);
10242 ip6_out->ip6_plen = len - sizeof(*ip6_out);
10243#ifdef SCTP_PACKET_LOGGING
10244 sctp_packet_log(mout, len);
10245#endif
10246 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10219
10220 /* Free the route if we got one back */
10221 if (ro.ro_rt)
10222 RTFREE(ro.ro_rt);
10223 } else if (ip6_out != NULL) {
10224 struct route_in6 ro;
10225 int ret;
10226 struct sctp_tcb *stcb = NULL;
10227 struct ifnet *ifp = NULL;
10228
10229 /* zap the stack pointer to the route */
10230 bzero(&ro, sizeof(ro));
10231 SCTPDBG(SCTP_DEBUG_OUTPUT2, "sctp_send_abort calling ip6_output:\n");
10232 SCTPDBG_PKT(SCTP_DEBUG_OUTPUT2, (struct ip *)ip6_out, &abm->sh);
10233 ip6_out->ip6_plen = len - sizeof(*ip6_out);
10234#ifdef SCTP_PACKET_LOGGING
10235 sctp_packet_log(mout, len);
10236#endif
10237 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10247 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
10238 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
10248
10249 /* Free the route if we got one back */
10250 if (ro.ro_rt)
10251 RTFREE(ro.ro_rt);
10252 }
10253 SCTP_STAT_INCR(sctps_sendpackets);
10254 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10255}
10256
10257void
10258sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
10239
10240 /* Free the route if we got one back */
10241 if (ro.ro_rt)
10242 RTFREE(ro.ro_rt);
10243 }
10244 SCTP_STAT_INCR(sctps_sendpackets);
10245 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10246}
10247
10248void
10249sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
10259 uint32_t vrf_id, uint32_t table_id)
10250 uint32_t vrf_id)
10260{
10261 struct mbuf *o_pak;
10262 struct sctphdr *ihdr;
10263 int retcode;
10264 struct sctphdr *ohdr;
10265 struct sctp_chunkhdr *ophdr;
10266 struct ip *iph;
10267 struct mbuf *mout;

--- 76 unchanged lines hidden (view full) ---

10344 out->ip_src = iph->ip_dst;
10345 out->ip_dst = iph->ip_src;
10346 out->ip_len = len;
10347#ifdef SCTP_PACKET_LOGGING
10348 sctp_packet_log(mout, len);
10349#endif
10350 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10351
10251{
10252 struct mbuf *o_pak;
10253 struct sctphdr *ihdr;
10254 int retcode;
10255 struct sctphdr *ohdr;
10256 struct sctp_chunkhdr *ophdr;
10257 struct ip *iph;
10258 struct mbuf *mout;

--- 76 unchanged lines hidden (view full) ---

10335 out->ip_src = iph->ip_dst;
10336 out->ip_dst = iph->ip_src;
10337 out->ip_len = len;
10338#ifdef SCTP_PACKET_LOGGING
10339 sctp_packet_log(mout, len);
10340#endif
10341 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10342
10352 SCTP_IP_OUTPUT(retcode, o_pak, &ro, stcb, vrf_id, table_id);
10343 SCTP_IP_OUTPUT(retcode, o_pak, &ro, stcb, vrf_id);
10353
10354 SCTP_STAT_INCR(sctps_sendpackets);
10355 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10356 /* Free the route if we got one back */
10357 if (ro.ro_rt)
10358 RTFREE(ro.ro_rt);
10359 } else {
10360 /* V6 */

--- 30 unchanged lines hidden (view full) ---

10391 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&lsa6);
10392 SCTPDBG(SCTP_DEBUG_OUTPUT2, "dst ");
10393 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&fsa6);
10394
10395#ifdef SCTP_PACKET_LOGGING
10396 sctp_packet_log(mout, len);
10397#endif
10398 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10344
10345 SCTP_STAT_INCR(sctps_sendpackets);
10346 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10347 /* Free the route if we got one back */
10348 if (ro.ro_rt)
10349 RTFREE(ro.ro_rt);
10350 } else {
10351 /* V6 */

--- 30 unchanged lines hidden (view full) ---

10382 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&lsa6);
10383 SCTPDBG(SCTP_DEBUG_OUTPUT2, "dst ");
10384 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&fsa6);
10385
10386#ifdef SCTP_PACKET_LOGGING
10387 sctp_packet_log(mout, len);
10388#endif
10389 SCTP_ATTACH_CHAIN(o_pak, mout, len);
10399 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id, table_id);
10390 SCTP_IP6_OUTPUT(ret, o_pak, &ro, &ifp, stcb, vrf_id);
10400
10401 SCTP_STAT_INCR(sctps_sendpackets);
10402 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10403 /* Free the route if we got one back */
10404 if (ro.ro_rt)
10405 RTFREE(ro.ro_rt);
10406 }
10407}

--- 1449 unchanged lines hidden ---
10391
10392 SCTP_STAT_INCR(sctps_sendpackets);
10393 SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
10394 /* Free the route if we got one back */
10395 if (ro.ro_rt)
10396 RTFREE(ro.ro_rt);
10397 }
10398}

--- 1449 unchanged lines hidden ---