Commit a987f762 authored by Wei Yongjun's avatar Wei Yongjun Committed by Vlad Yasevich

sctp: fix report unrecognized parameter in ACSONF-ACK

RFC5061 Section 5.2.  Upon Reception of an ASCONF Chunk

V2)  In processing the chunk, the receiver should build a
     response message with the appropriate error TLVs, as
     specified in the Parameter type bits, for any ASCONF
     Parameter it does not understand.  To indicate an
     unrecognized parameter, Cause Type 8 should be used as
     defined in the ERROR in Section 3.3.10.8, [RFC4960].  The
     endpoint may also use the response to carry rejections for
     other reasons, such as resource shortages, etc., using the
     Error Cause TLV and an appropriate error condition.

So we should indicate an unrecognized parameter with error
SCTP_ERROR_UNKNOWN_PARAM in ACSONF-ACK chunk, not
SCTP_ERROR_INV_PARAM.
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent a84db794
...@@ -2959,7 +2959,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, ...@@ -2959,7 +2959,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
sctp_assoc_set_primary(asoc, peer); sctp_assoc_set_primary(asoc, peer);
break; break;
default: default:
return SCTP_ERROR_INV_PARAM; return SCTP_ERROR_UNKNOWN_PARAM;
break; break;
} }
...@@ -3273,7 +3273,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, ...@@ -3273,7 +3273,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
retval = 1; retval = 1;
break; break;
case SCTP_ERROR_INV_PARAM: case SCTP_ERROR_UNKNOWN_PARAM:
/* Disable sending this type of asconf parameter in /* Disable sending this type of asconf parameter in
* future. * future.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment