aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c10
-rw-r--r--net/dccp/ipv6.c8
-rw-r--r--net/dccp/output.c2
3 files changed, 11 insertions, 9 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index d1dd95289b89..a0a36c9e6cce 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -452,7 +452,7 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
452 struct sk_buff *skb) 452 struct sk_buff *skb)
453{ 453{
454 struct rtable *rt; 454 struct rtable *rt;
455 struct flowi fl = { .oif = skb->rtable->rt_iif, 455 struct flowi fl = { .oif = skb_rtable(skb)->rt_iif,
456 .nl_u = { .ip4_u = 456 .nl_u = { .ip4_u =
457 { .daddr = ip_hdr(skb)->saddr, 457 { .daddr = ip_hdr(skb)->saddr,
458 .saddr = ip_hdr(skb)->daddr, 458 .saddr = ip_hdr(skb)->daddr,
@@ -507,14 +507,14 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
507 const struct iphdr *rxiph; 507 const struct iphdr *rxiph;
508 struct sk_buff *skb; 508 struct sk_buff *skb;
509 struct dst_entry *dst; 509 struct dst_entry *dst;
510 struct net *net = dev_net(rxskb->dst->dev); 510 struct net *net = dev_net(skb_dst(rxskb)->dev);
511 struct sock *ctl_sk = net->dccp.v4_ctl_sk; 511 struct sock *ctl_sk = net->dccp.v4_ctl_sk;
512 512
513 /* Never send a reset in response to a reset. */ 513 /* Never send a reset in response to a reset. */
514 if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET) 514 if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET)
515 return; 515 return;
516 516
517 if (rxskb->rtable->rt_type != RTN_LOCAL) 517 if (skb_rtable(rxskb)->rt_type != RTN_LOCAL)
518 return; 518 return;
519 519
520 dst = dccp_v4_route_skb(net, ctl_sk, rxskb); 520 dst = dccp_v4_route_skb(net, ctl_sk, rxskb);
@@ -528,7 +528,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
528 rxiph = ip_hdr(rxskb); 528 rxiph = ip_hdr(rxskb);
529 dccp_hdr(skb)->dccph_checksum = dccp_v4_csum_finish(skb, rxiph->saddr, 529 dccp_hdr(skb)->dccph_checksum = dccp_v4_csum_finish(skb, rxiph->saddr,
530 rxiph->daddr); 530 rxiph->daddr);
531 skb->dst = dst_clone(dst); 531 skb_dst_set(skb, dst_clone(dst));
532 532
533 bh_lock_sock(ctl_sk); 533 bh_lock_sock(ctl_sk);
534 err = ip_build_and_send_pkt(skb, ctl_sk, 534 err = ip_build_and_send_pkt(skb, ctl_sk,
@@ -567,7 +567,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
567 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb); 567 struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);
568 568
569 /* Never answer to DCCP_PKT_REQUESTs send to broadcast or multicast */ 569 /* Never answer to DCCP_PKT_REQUESTs send to broadcast or multicast */
570 if (skb->rtable->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) 570 if (skb_rtable(skb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
571 return 0; /* discard, don't send a reset here */ 571 return 0; /* discard, don't send a reset here */
572 572
573 if (dccp_bad_service_code(sk, service)) { 573 if (dccp_bad_service_code(sk, service)) {
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index b963f35c65f6..05ea7440d9e5 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -314,8 +314,9 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
314 struct ipv6hdr *rxip6h; 314 struct ipv6hdr *rxip6h;
315 struct sk_buff *skb; 315 struct sk_buff *skb;
316 struct flowi fl; 316 struct flowi fl;
317 struct net *net = dev_net(rxskb->dst->dev); 317 struct net *net = dev_net(skb_dst(rxskb)->dev);
318 struct sock *ctl_sk = net->dccp.v6_ctl_sk; 318 struct sock *ctl_sk = net->dccp.v6_ctl_sk;
319 struct dst_entry *dst;
319 320
320 if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET) 321 if (dccp_hdr(rxskb)->dccph_type == DCCP_PKT_RESET)
321 return; 322 return;
@@ -342,8 +343,9 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
342 security_skb_classify_flow(rxskb, &fl); 343 security_skb_classify_flow(rxskb, &fl);
343 344
344 /* sk = NULL, but it is safe for now. RST socket required. */ 345 /* sk = NULL, but it is safe for now. RST socket required. */
345 if (!ip6_dst_lookup(ctl_sk, &skb->dst, &fl)) { 346 if (!ip6_dst_lookup(ctl_sk, &dst, &fl)) {
346 if (xfrm_lookup(net, &skb->dst, &fl, NULL, 0) >= 0) { 347 if (xfrm_lookup(net, &dst, &fl, NULL, 0) >= 0) {
348 skb_dst_set(skb, dst);
347 ip6_xmit(ctl_sk, skb, &fl, NULL, 0); 349 ip6_xmit(ctl_sk, skb, &fl, NULL, 0);
348 DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); 350 DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS);
349 DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS); 351 DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS);
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 36bcc00654d3..c0e88c16d088 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -350,7 +350,7 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
350 /* Reserve space for headers. */ 350 /* Reserve space for headers. */
351 skb_reserve(skb, sk->sk_prot->max_header); 351 skb_reserve(skb, sk->sk_prot->max_header);
352 352
353 skb->dst = dst_clone(dst); 353 skb_dst_set(skb, dst_clone(dst));
354 354
355 dreq = dccp_rsk(req); 355 dreq = dccp_rsk(req);
356 if (inet_rsk(req)->acked) /* increase ISS upon retransmission */ 356 if (inet_rsk(req)->acked) /* increase ISS upon retransmission */