diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/output.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index c25b0423887a..74ff87025878 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -58,10 +58,21 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
58 | switch (dcb->dccpd_type) { | 58 | switch (dcb->dccpd_type) { |
59 | case DCCP_PKT_DATA: | 59 | case DCCP_PKT_DATA: |
60 | set_ack = 0; | 60 | set_ack = 0; |
61 | /* fall through */ | ||
62 | case DCCP_PKT_DATAACK: | ||
61 | break; | 63 | break; |
64 | |||
62 | case DCCP_PKT_SYNC: | 65 | case DCCP_PKT_SYNC: |
63 | case DCCP_PKT_SYNCACK: | 66 | case DCCP_PKT_SYNCACK: |
64 | ackno = dcb->dccpd_seq; | 67 | ackno = dcb->dccpd_seq; |
68 | /* fall through */ | ||
69 | default: | ||
70 | /* | ||
71 | * Only data packets should come through with skb->sk | ||
72 | * set. | ||
73 | */ | ||
74 | WARN_ON(skb->sk); | ||
75 | skb_set_owner_w(skb, sk); | ||
65 | break; | 76 | break; |
66 | } | 77 | } |
67 | 78 | ||
@@ -71,12 +82,6 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
71 | skb->h.raw = skb_push(skb, dccp_header_size); | 82 | skb->h.raw = skb_push(skb, dccp_header_size); |
72 | dh = dccp_hdr(skb); | 83 | dh = dccp_hdr(skb); |
73 | 84 | ||
74 | /* | ||
75 | * Only data packets should come through with skb->sk set. | ||
76 | */ | ||
77 | if (!skb->sk) | ||
78 | skb_set_owner_w(skb, sk); | ||
79 | |||
80 | /* Build DCCP header and checksum it. */ | 85 | /* Build DCCP header and checksum it. */ |
81 | memset(dh, 0, dccp_header_size); | 86 | memset(dh, 0, dccp_header_size); |
82 | dh->dccph_type = dcb->dccpd_type; | 87 | dh->dccph_type = dcb->dccpd_type; |