[<prev] [next>] [day] [month] [year] [list]
Message-Id: <AD392EDF-F72C-407A-9FBC-4F3F2902687A@sfc.wide.ad.jp>
Date: Thu, 21 Apr 2011 04:24:55 +0900
From: Michio Honda <micchie@....wide.ad.jp>
To: netdev@...r.kernel.org
Cc: lksctp-developers@...ts.sourceforge.net
Subject: [PATCH net-next-2.6 v4 5/5] sctp: Add ADD/DEL ASCONF handling at the receiver
With this patch, ASCONF receiver supports deletion of the source address of the ASCONF chunk when the ADDIP co-located in the earlier parameter.
Signed-off-by: Michio Honda <micchie@....wide.ad.jp>
---
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index de98665..a5d673b 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2914,6 +2914,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
struct sctp_af *af;
union sctp_addr addr;
union sctp_addr_param *addr_param;
+ int del_srcaddr_ok = 0;
addr_param = (union sctp_addr_param *)
((void *)asconf_param + sizeof(sctp_addip_param_t));
@@ -2973,6 +2974,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
/* Start the heartbeat timer. */
if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer)))
sctp_transport_hold(peer);
+ del_srcaddr_ok = 1;
break;
case SCTP_PARAM_DEL_IP:
/* ADDIP 4.3 D7) If a request is received to delete the
@@ -2990,7 +2992,8 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
* an Error Cause TLV set to the new error code 'Request to
* Delete Source IP Address'
*/
- if (sctp_cmp_addr_exact(sctp_source(asconf), &addr))
+ if (sctp_cmp_addr_exact(sctp_source(asconf), &addr) &&
+ !del_srcaddr_ok)
return SCTP_ERROR_DEL_SRC_IP;
/* Section 4.2.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists