This special case it is not as you said. The packet seq as following:
Endpoint A Endpoing B
REQUEST --------->
(CHANGE L/unknow feature)
<--------- RESPONSE
(CONFIRM R/empty unknow feature)
ACK ---------->
call dccp_feat_activate_values()
-->print DCCP_BUG("Unknown feature %u", cur->feat_num);
After Endpoint B send REPONSE with empty CONFIRM R option, the unknow
feature is *still remain* in the feature list. dccp_feat_insert_opts()
never clean up
those features. So here we can get idx < 0. Features with is not needed
is clean up
after active the feat value in dccp_feat_activate_values().
int dccp_feat_activate_values(struct sock *sk, struct list_head *fn_list)
{
...
list_for_each_entry_safe(cur, next, fn_list, node)
if (!cur->needs_confirm)
dccp_feat_list_pop(cur);
...
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html