Commit f53dc67c authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

[DCCP]: Use AF-independent rebuild_header routine

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: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 276f2edc
...@@ -391,7 +391,7 @@ int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code) ...@@ -391,7 +391,7 @@ int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code)
* FIXME: what if rebuild_header fails? * FIXME: what if rebuild_header fails?
* Should we be doing a rebuild_header here? * 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) if (err != 0)
return err; return err;
......
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