aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 7f56f7e8f571..9a1a76a7dc41 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -501,6 +501,9 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
501 501
502 dccp_openreq_init(req, &dp, skb); 502 dccp_openreq_init(req, &dp, skb);
503 503
504 if (security_inet_conn_request(sk, skb, req))
505 goto drop_and_free;
506
504 ireq = inet_rsk(req); 507 ireq = inet_rsk(req);
505 ireq->loc_addr = daddr; 508 ireq->loc_addr = daddr;
506 ireq->rmt_addr = saddr; 509 ireq->rmt_addr = saddr;
@@ -605,10 +608,10 @@ static struct sock *dccp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
605 if (req != NULL) 608 if (req != NULL)
606 return dccp_check_req(sk, skb, req, prev); 609 return dccp_check_req(sk, skb, req, prev);
607 610
608 nsk = __inet_lookup_established(&dccp_hashinfo, 611 nsk = inet_lookup_established(&dccp_hashinfo,
609 iph->saddr, dh->dccph_sport, 612 iph->saddr, dh->dccph_sport,
610 iph->daddr, ntohs(dh->dccph_dport), 613 iph->daddr, dh->dccph_dport,
611 inet_iif(skb)); 614 inet_iif(skb));
612 if (nsk != NULL) { 615 if (nsk != NULL) {
613 if (nsk->sk_state != DCCP_TIME_WAIT) { 616 if (nsk->sk_state != DCCP_TIME_WAIT) {
614 bh_lock_sock(nsk); 617 bh_lock_sock(nsk);
@@ -678,6 +681,7 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
678 } 681 }
679 }; 682 };
680 683
684 security_skb_classify_flow(skb, &fl);
681 if (ip_route_output_flow(&rt, &fl, sk, 0)) { 685 if (ip_route_output_flow(&rt, &fl, sk, 0)) {
682 IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); 686 IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
683 return NULL; 687 return NULL;
@@ -921,7 +925,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
921 * Look up flow ID in table and get corresponding socket */ 925 * Look up flow ID in table and get corresponding socket */
922 sk = __inet_lookup(&dccp_hashinfo, 926 sk = __inet_lookup(&dccp_hashinfo,
923 skb->nh.iph->saddr, dh->dccph_sport, 927 skb->nh.iph->saddr, dh->dccph_sport,
924 skb->nh.iph->daddr, ntohs(dh->dccph_dport), 928 skb->nh.iph->daddr, dh->dccph_dport,
925 inet_iif(skb)); 929 inet_iif(skb));
926 930
927 /* 931 /*