Remove Feature Negotiation Confirm Options from the list of options to send after they are sent once because such options are NOT supposed to be retransmitted and are ONLY supposed to be sent in response to a Change Option (RFC 4340 6.2). --- Signed-off-by: Samuel Jero diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 6f2bc96..ab85f23 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c @@ -690,11 +690,18 @@ int dccp_feat_insert_opts(struct dccp_sock *dp, struct dccp_request_sock *dreq, return -1; if (pos->needs_mandatory && dccp_insert_option_mandatory(skb)) return -1; - /* - * Enter CHANGING after transmitting the Change option (6.6.2). - */ - if (pos->state == FEAT_INITIALISING) - pos->state = FEAT_CHANGING; + + if (opt == DCCPO_CONFIRM_R || opt == DCCPO_CONFIRM_L) { + /*Confirms don't get retransmitted (6.6.3)*/ + dccp_feat_list_pop(pos); + } else { + /* + * Enter CHANGING after transmitting + * the Change option (6.6.2). + */ + if (pos->state == FEAT_INITIALISING) + pos->state = FEAT_CHANGING; + } } return 0; }
Attachment:
signature.asc
Description: This is a digitally signed message part