Skip to content

Commit

Permalink
[DCCP]: Use AF-independent rebuild_header routine
Browse files Browse the repository at this point in the history
This fixes a nasty bug: dccp_send_reset() is called by both DCCPv4 and DCCPv6, but uses
inet_sk_rebuild_header() in each case. This leads to unpredictable and weird behaviour:
under some conditions, DCCPv6 Resets were sent, in other not.

The fix is to use the AF-independent rebuild_header routine.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jan 28, 2008
1 parent 276f2ed commit f53dc67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dccp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code)
* FIXME: what if rebuild_header fails?
* Should we be doing a rebuild_header here?
*/
int err = inet_sk_rebuild_header(sk);
int err = inet_csk(sk)->icsk_af_ops->rebuild_header(sk);

if (err != 0)
return err;
Expand Down

0 comments on commit f53dc67

Please sign in to comment.