: Use AF-independent rebuild_header routine
PATCH 1/4 : Use AF-independent rebuild_header routine
[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.
--- net/dccp/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dccp/output.c +1 -1
@@ -391,7 +391,7 @@ int dccp_send_reset(struct sock *sk, enu* 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;
Arnaldo Carvalho de Melo
AppliedEm Wed, Nov 28, 2007 at 08:35:08AM +0000, Gerrit Renker escreveu:
Quoted 9 lines
[DCCP]: Use AF-independent
rebuild_headerroutineThis fixes a nasty bug:
dccp_send_reset()is called by both DCCPv4 and DCCPv6, but usesinet_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_headerroutine.Signed-off-by Gerrit Renker <[email protected]>
Thanks, applied.
- Arnaldo