Skip to content

Commit

Permalink
dccp: Fill in the Data fields for "Option Error" Resets
Browse files Browse the repository at this point in the history
This updates the use of the `out_invalid_option' label, which produces a 
Reset (code 5, "Option Error"), to fill in the  Data1...Data3 fields as
specified in RFC 4340, 5.6.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
  • Loading branch information
Gerrit Renker committed Sep 4, 2008
1 parent faf61c3 commit eac7726
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
DCCP_INC_STATS_BH(DCCP_MIB_INVALIDOPT);
DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_OPTION_ERROR;
DCCP_WARN("DCCP(%p): invalid option %d, len=%d", sk, opt, len);
DCCP_SKB_CB(skb)->dccpd_reset_data[0] = opt;
DCCP_SKB_CB(skb)->dccpd_reset_data[1] = len > 0 ? value[0] : 0;
DCCP_SKB_CB(skb)->dccpd_reset_data[2] = len > 1 ? value[1] : 0;
return -1;
}

Expand Down

0 comments on commit eac7726

Please sign in to comment.