diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 00:29:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:44 -0500 |
commit | 1d28f42c1bd4bb2363d88df74d0128b4da135b4a (patch) | |
tree | cb2e652fe79a2bc307e871bc2d3fa51cc8051e45 /net/dccp | |
parent | ca116922afa8cc5ad46b00c0a637b1cde5ca478a (diff) |
net: Put flowi_* prefix on AF independent members of struct flowi
I intend to turn struct flowi into a union of AF specific flowi
structs. There will be a common structure that each variant includes
first, much like struct sock_common.
This is the first step to move in that direction.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 17 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 20 |
2 files changed, 19 insertions, 18 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7882377bc62e..09a09911c5ea 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -465,14 +465,15 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk, | |||
465 | struct sk_buff *skb) | 465 | struct sk_buff *skb) |
466 | { | 466 | { |
467 | struct rtable *rt; | 467 | struct rtable *rt; |
468 | struct flowi fl = { .oif = skb_rtable(skb)->rt_iif, | 468 | struct flowi fl = { |
469 | .fl4_dst = ip_hdr(skb)->saddr, | 469 | .flowi_oif = skb_rtable(skb)->rt_iif, |
470 | .fl4_src = ip_hdr(skb)->daddr, | 470 | .fl4_dst = ip_hdr(skb)->saddr, |
471 | .fl4_tos = RT_CONN_FLAGS(sk), | 471 | .fl4_src = ip_hdr(skb)->daddr, |
472 | .proto = sk->sk_protocol, | 472 | .fl4_tos = RT_CONN_FLAGS(sk), |
473 | .fl_ip_sport = dccp_hdr(skb)->dccph_dport, | 473 | .flowi_proto = sk->sk_protocol, |
474 | .fl_ip_dport = dccp_hdr(skb)->dccph_sport | 474 | .fl_ip_sport = dccp_hdr(skb)->dccph_dport, |
475 | }; | 475 | .fl_ip_dport = dccp_hdr(skb)->dccph_sport, |
476 | }; | ||
476 | 477 | ||
477 | security_skb_classify_flow(skb, &fl); | 478 | security_skb_classify_flow(skb, &fl); |
478 | rt = ip_route_output_flow(net, &fl, sk); | 479 | rt = ip_route_output_flow(net, &fl, sk); |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 5efc57f5e605..5209ee7a3dc2 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -154,10 +154,10 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
154 | for now. | 154 | for now. |
155 | */ | 155 | */ |
156 | memset(&fl, 0, sizeof(fl)); | 156 | memset(&fl, 0, sizeof(fl)); |
157 | fl.proto = IPPROTO_DCCP; | 157 | fl.flowi_proto = IPPROTO_DCCP; |
158 | ipv6_addr_copy(&fl.fl6_dst, &np->daddr); | 158 | ipv6_addr_copy(&fl.fl6_dst, &np->daddr); |
159 | ipv6_addr_copy(&fl.fl6_src, &np->saddr); | 159 | ipv6_addr_copy(&fl.fl6_src, &np->saddr); |
160 | fl.oif = sk->sk_bound_dev_if; | 160 | fl.flowi_oif = sk->sk_bound_dev_if; |
161 | fl.fl_ip_dport = inet->inet_dport; | 161 | fl.fl_ip_dport = inet->inet_dport; |
162 | fl.fl_ip_sport = inet->inet_sport; | 162 | fl.fl_ip_sport = inet->inet_sport; |
163 | security_sk_classify_flow(sk, &fl); | 163 | security_sk_classify_flow(sk, &fl); |
@@ -248,11 +248,11 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req, | |||
248 | struct dst_entry *dst; | 248 | struct dst_entry *dst; |
249 | 249 | ||
250 | memset(&fl, 0, sizeof(fl)); | 250 | memset(&fl, 0, sizeof(fl)); |
251 | fl.proto = IPPROTO_DCCP; | 251 | fl.flowi_proto = IPPROTO_DCCP; |
252 | ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr); | 252 | ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr); |
253 | ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr); | 253 | ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr); |
254 | fl.fl6_flowlabel = 0; | 254 | fl.fl6_flowlabel = 0; |
255 | fl.oif = ireq6->iif; | 255 | fl.flowi_oif = ireq6->iif; |
256 | fl.fl_ip_dport = inet_rsk(req)->rmt_port; | 256 | fl.fl_ip_dport = inet_rsk(req)->rmt_port; |
257 | fl.fl_ip_sport = inet_rsk(req)->loc_port; | 257 | fl.fl_ip_sport = inet_rsk(req)->loc_port; |
258 | security_req_classify_flow(req, &fl); | 258 | security_req_classify_flow(req, &fl); |
@@ -321,8 +321,8 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) | |||
321 | ipv6_addr_copy(&fl.fl6_dst, &rxip6h->saddr); | 321 | ipv6_addr_copy(&fl.fl6_dst, &rxip6h->saddr); |
322 | ipv6_addr_copy(&fl.fl6_src, &rxip6h->daddr); | 322 | ipv6_addr_copy(&fl.fl6_src, &rxip6h->daddr); |
323 | 323 | ||
324 | fl.proto = IPPROTO_DCCP; | 324 | fl.flowi_proto = IPPROTO_DCCP; |
325 | fl.oif = inet6_iif(rxskb); | 325 | fl.flowi_oif = inet6_iif(rxskb); |
326 | fl.fl_ip_dport = dccp_hdr(skb)->dccph_dport; | 326 | fl.fl_ip_dport = dccp_hdr(skb)->dccph_dport; |
327 | fl.fl_ip_sport = dccp_hdr(skb)->dccph_sport; | 327 | fl.fl_ip_sport = dccp_hdr(skb)->dccph_sport; |
328 | security_skb_classify_flow(rxskb, &fl); | 328 | security_skb_classify_flow(rxskb, &fl); |
@@ -530,11 +530,11 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, | |||
530 | struct flowi fl; | 530 | struct flowi fl; |
531 | 531 | ||
532 | memset(&fl, 0, sizeof(fl)); | 532 | memset(&fl, 0, sizeof(fl)); |
533 | fl.proto = IPPROTO_DCCP; | 533 | fl.flowi_proto = IPPROTO_DCCP; |
534 | ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr); | 534 | ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr); |
535 | final_p = fl6_update_dst(&fl, opt, &final); | 535 | final_p = fl6_update_dst(&fl, opt, &final); |
536 | ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr); | 536 | ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr); |
537 | fl.oif = sk->sk_bound_dev_if; | 537 | fl.flowi_oif = sk->sk_bound_dev_if; |
538 | fl.fl_ip_dport = inet_rsk(req)->rmt_port; | 538 | fl.fl_ip_dport = inet_rsk(req)->rmt_port; |
539 | fl.fl_ip_sport = inet_rsk(req)->loc_port; | 539 | fl.fl_ip_sport = inet_rsk(req)->loc_port; |
540 | security_sk_classify_flow(sk, &fl); | 540 | security_sk_classify_flow(sk, &fl); |
@@ -953,10 +953,10 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
953 | if (!ipv6_addr_any(&np->rcv_saddr)) | 953 | if (!ipv6_addr_any(&np->rcv_saddr)) |
954 | saddr = &np->rcv_saddr; | 954 | saddr = &np->rcv_saddr; |
955 | 955 | ||
956 | fl.proto = IPPROTO_DCCP; | 956 | fl.flowi_proto = IPPROTO_DCCP; |
957 | ipv6_addr_copy(&fl.fl6_dst, &np->daddr); | 957 | ipv6_addr_copy(&fl.fl6_dst, &np->daddr); |
958 | ipv6_addr_copy(&fl.fl6_src, saddr ? saddr : &np->saddr); | 958 | ipv6_addr_copy(&fl.fl6_src, saddr ? saddr : &np->saddr); |
959 | fl.oif = sk->sk_bound_dev_if; | 959 | fl.flowi_oif = sk->sk_bound_dev_if; |
960 | fl.fl_ip_dport = usin->sin6_port; | 960 | fl.fl_ip_dport = usin->sin6_port; |
961 | fl.fl_ip_sport = inet->inet_sport; | 961 | fl.fl_ip_sport = inet->inet_sport; |
962 | security_sk_classify_flow(sk, &fl); | 962 | security_sk_classify_flow(sk, &fl); |