aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-04-12 21:35:41 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-12 21:35:41 -0400
commit028b027524b162eef90839a92ba4b8bddf23e06c (patch)
tree5c128717f73ff6fb93c361cfae6961267ed52082 /net/dccp/ipv4.c
parentae1b6a31b1f9ef2c7ba5ef89799f210a9ba6937c (diff)
[DCCP]: Fix skb->cb conflicts with IP
dev_queue_xmit() and the other IP output functions expect to get a skb with clear or properly initialized skb->cb. Unlike TCP and UDP, the dccp_skb_cb doesn't contain a struct inet_skb_parm at the beginning, so the DCCP-specific data is interpreted by the IP output functions. This can cause false negatives for the conditional POST_ROUTING hook invocation, making the packet bypass the hook. Add a inet_skb_parm/inet6_skb_parm union to the beginning of dccp_skb_cb to avoid clashes. Also add a BUILD_BUG_ON to make sure it fits in the cb. [ Combined with patch from Gerrit Renker to remove two now unnecessary memsets of IPCB(skb)->opt ] Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 474075adbde4..b33704415555 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -489,7 +489,6 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
489 489
490 dh->dccph_checksum = dccp_v4_csum_finish(skb, ireq->loc_addr, 490 dh->dccph_checksum = dccp_v4_csum_finish(skb, ireq->loc_addr,
491 ireq->rmt_addr); 491 ireq->rmt_addr);
492 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
493 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, 492 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,
494 ireq->rmt_addr, 493 ireq->rmt_addr,
495 ireq->opt); 494 ireq->opt);