Deleted Added
full compact
sctp_asconf.c (201758) sctp_asconf.c (206137)
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_asconf.c,v 1.24 2005/03/06 16:04:16 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_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 201758 2010-01-07 21:01:37Z mbr $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 206137 2010-04-03 15:40:14Z tuexen $");
35#include <netinet/sctp_os.h>
36#include <netinet/sctp_var.h>
37#include <netinet/sctp_sysctl.h>
38#include <netinet/sctp_pcb.h>
39#include <netinet/sctp_header.h>
40#include <netinet/sctputil.h>
41#include <netinet/sctp_output.h>
42#include <netinet/sctp_asconf.h>

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

551 if (response_required) {
552 m_reply = sctp_asconf_success_response(aph->correlation_id);
553 }
554 /*
555 * Mobility adaptation. Ideally, when the reception of SET
556 * PRIMARY with DELETE IP ADDRESS of the previous primary
557 * destination, unacknowledged DATA are retransmitted
558 * immediately to the new primary destination for seamless
35#include <netinet/sctp_os.h>
36#include <netinet/sctp_var.h>
37#include <netinet/sctp_sysctl.h>
38#include <netinet/sctp_pcb.h>
39#include <netinet/sctp_header.h>
40#include <netinet/sctputil.h>
41#include <netinet/sctp_output.h>
42#include <netinet/sctp_asconf.h>

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

551 if (response_required) {
552 m_reply = sctp_asconf_success_response(aph->correlation_id);
553 }
554 /*
555 * Mobility adaptation. Ideally, when the reception of SET
556 * PRIMARY with DELETE IP ADDRESS of the previous primary
557 * destination, unacknowledged DATA are retransmitted
558 * immediately to the new primary destination for seamless
559 * handover. If the destination is UNCONFIRMED and marked
560 * to REQ_PRIM, The retransmission occur when reception of
561 * the HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in
559 * handover. If the destination is UNCONFIRMED and marked to
560 * REQ_PRIM, The retransmission occur when reception of the
561 * HEARTBEAT-ACK. (See sctp_handle_heartbeat_ack in
562 * sctp_input.c) Also, when change of the primary
563 * destination, it is better that all subsequent new DATA
564 * containing already queued DATA are transmitted to the new
565 * primary destination. (by micchie)
566 */
567 if ((sctp_is_mobility_feature_on(stcb->sctp_ep,
568 SCTP_MOBILITY_BASE) ||
569 sctp_is_mobility_feature_on(stcb->sctp_ep,

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

1161static void
1162sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
1163{
1164 struct sctp_nets *net;
1165 int addrnum, changed;
1166
1167 /*
1168 * If number of local valid addresses is 1, the valid address is
562 * sctp_input.c) Also, when change of the primary
563 * destination, it is better that all subsequent new DATA
564 * containing already queued DATA are transmitted to the new
565 * primary destination. (by micchie)
566 */
567 if ((sctp_is_mobility_feature_on(stcb->sctp_ep,
568 SCTP_MOBILITY_BASE) ||
569 sctp_is_mobility_feature_on(stcb->sctp_ep,

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

1161static void
1162sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
1163{
1164 struct sctp_nets *net;
1165 int addrnum, changed;
1166
1167 /*
1168 * If number of local valid addresses is 1, the valid address is
1169 * probably newly added address. Several valid addresses in this
1169 * probably newly added address. Several valid addresses in this
1170 * association. A source address may not be changed. Additionally,
1171 * they can be configured on a same interface as "alias" addresses.
1172 * (by micchie)
1173 */
1174 addrnum = sctp_local_addr_count(stcb);
1175 SCTPDBG(SCTP_DEBUG_ASCONF1, "p_check_react(): %d local addresses\n",
1176 addrnum);
1177 if (addrnum == 1) {

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

1205 if (net->src_addr_selected) {
1206 sctp_free_ifa(net->ro._s_addr);
1207 net->ro._s_addr = NULL;
1208 net->src_addr_selected = 0;
1209 }
1210 /*
1211 * Check if the nexthop is corresponding to the new address.
1212 * If the new address is corresponding to the current
1170 * association. A source address may not be changed. Additionally,
1171 * they can be configured on a same interface as "alias" addresses.
1172 * (by micchie)
1173 */
1174 addrnum = sctp_local_addr_count(stcb);
1175 SCTPDBG(SCTP_DEBUG_ASCONF1, "p_check_react(): %d local addresses\n",
1176 addrnum);
1177 if (addrnum == 1) {

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

1205 if (net->src_addr_selected) {
1206 sctp_free_ifa(net->ro._s_addr);
1207 net->ro._s_addr = NULL;
1208 net->src_addr_selected = 0;
1209 }
1210 /*
1211 * Check if the nexthop is corresponding to the new address.
1212 * If the new address is corresponding to the current
1213 * nexthop, the path will be changed. If the new address is
1213 * nexthop, the path will be changed. If the new address is
1214 * NOT corresponding to the current nexthop, the path will
1215 * not be changed.
1216 */
1217 SCTP_RTALLOC((sctp_route_t *) & net->ro,
1218 stcb->sctp_ep->def_vrf_id);
1219 if (net->ro.ro_rt == NULL)
1220 continue;
1221

--- 2215 unchanged lines hidden ---
1214 * NOT corresponding to the current nexthop, the path will
1215 * not be changed.
1216 */
1217 SCTP_RTALLOC((sctp_route_t *) & net->ro,
1218 stcb->sctp_ep->def_vrf_id);
1219 if (net->ro.ro_rt == NULL)
1220 continue;
1221

--- 2215 unchanged lines hidden ---