aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/flow.h17
-rw-r--r--net/dccp/ipv6.c20
-rw-r--r--net/ipv6/af_inet6.c4
-rw-r--r--net/ipv6/datagram.c6
-rw-r--r--net/ipv6/icmp.c10
-rw-r--r--net/ipv6/inet6_connection_sock.c8
-rw-r--r--net/ipv6/mip6.c2
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c4
-rw-r--r--net/ipv6/raw.c6
-rw-r--r--net/ipv6/syncookies.c4
-rw-r--r--net/ipv6/tcp_ipv6.c16
-rw-r--r--net/ipv6/udp.c10
-rw-r--r--net/ipv6/xfrm6_policy.c12
13 files changed, 58 insertions, 61 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index 44bd37628f55..172d76dd8731 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -84,6 +84,13 @@ struct flowi6 {
84 struct in6_addr saddr; 84 struct in6_addr saddr;
85 __be32 flowlabel; 85 __be32 flowlabel;
86 union flowi_uli uli; 86 union flowi_uli uli;
87#define fl6_sport uli.ports.sport
88#define fl6_dport uli.ports.dport
89#define fl6_icmp_type uli.icmpt.type
90#define fl6_icmp_code uli.icmpt.code
91#define fl6_ipsec_spi uli.spi
92#define fl6_mh_type uli.mht.type
93#define fl6_gre_key uli.gre_key
87}; 94};
88 95
89struct flowidn { 96struct flowidn {
@@ -112,16 +119,6 @@ struct flowi {
112 119
113#define fld_dst u.dn.daddr 120#define fld_dst u.dn.daddr
114#define fld_src u.dn.saddr 121#define fld_src u.dn.saddr
115#define fl6_dst u.ip6.daddr
116#define fl6_src u.ip6.saddr
117#define fl6_flowlabel u.ip6.flowlabel
118#define fl6_sport u.ip6.uli.ports.sport
119#define fl6_dport u.ip6.uli.ports.dport
120#define fl6_icmp_type u.ip6.uli.icmpt.type
121#define fl6_icmp_code u.ip6.uli.icmpt.code
122#define fl6_ipsec_spi u.ip6.uli.spi
123#define fl6_mh_type u.ip6.uli.mht.type
124#define fl6_gre_key u.ip6.uli.gre_key
125} __attribute__((__aligned__(BITS_PER_LONG/8))); 122} __attribute__((__aligned__(BITS_PER_LONG/8)));
126 123
127static inline struct flowi *flowi4_to_flowi(struct flowi4 *fl4) 124static inline struct flowi *flowi4_to_flowi(struct flowi4 *fl4)
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 8d26c122de64..de1b7e37ad5b 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -158,8 +158,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
158 ipv6_addr_copy(&fl6.daddr, &np->daddr); 158 ipv6_addr_copy(&fl6.daddr, &np->daddr);
159 ipv6_addr_copy(&fl6.saddr, &np->saddr); 159 ipv6_addr_copy(&fl6.saddr, &np->saddr);
160 fl6.flowi6_oif = sk->sk_bound_dev_if; 160 fl6.flowi6_oif = sk->sk_bound_dev_if;
161 fl6.uli.ports.dport = inet->inet_dport; 161 fl6.fl6_dport = inet->inet_dport;
162 fl6.uli.ports.sport = inet->inet_sport; 162 fl6.fl6_sport = inet->inet_sport;
163 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); 163 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
164 164
165 dst = ip6_dst_lookup_flow(sk, &fl6, NULL, false); 165 dst = ip6_dst_lookup_flow(sk, &fl6, NULL, false);
@@ -253,8 +253,8 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
253 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); 253 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr);
254 fl6.flowlabel = 0; 254 fl6.flowlabel = 0;
255 fl6.flowi6_oif = ireq6->iif; 255 fl6.flowi6_oif = ireq6->iif;
256 fl6.uli.ports.dport = inet_rsk(req)->rmt_port; 256 fl6.fl6_dport = inet_rsk(req)->rmt_port;
257 fl6.uli.ports.sport = inet_rsk(req)->loc_port; 257 fl6.fl6_sport = inet_rsk(req)->loc_port;
258 security_req_classify_flow(req, flowi6_to_flowi(&fl6)); 258 security_req_classify_flow(req, flowi6_to_flowi(&fl6));
259 259
260 opt = np->opt; 260 opt = np->opt;
@@ -323,8 +323,8 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
323 323
324 fl6.flowi6_proto = IPPROTO_DCCP; 324 fl6.flowi6_proto = IPPROTO_DCCP;
325 fl6.flowi6_oif = inet6_iif(rxskb); 325 fl6.flowi6_oif = inet6_iif(rxskb);
326 fl6.uli.ports.dport = dccp_hdr(skb)->dccph_dport; 326 fl6.fl6_dport = dccp_hdr(skb)->dccph_dport;
327 fl6.uli.ports.sport = dccp_hdr(skb)->dccph_sport; 327 fl6.fl6_sport = dccp_hdr(skb)->dccph_sport;
328 security_skb_classify_flow(rxskb, flowi6_to_flowi(&fl6)); 328 security_skb_classify_flow(rxskb, flowi6_to_flowi(&fl6));
329 329
330 /* sk = NULL, but it is safe for now. RST socket required. */ 330 /* sk = NULL, but it is safe for now. RST socket required. */
@@ -535,8 +535,8 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
535 final_p = fl6_update_dst(&fl6, opt, &final); 535 final_p = fl6_update_dst(&fl6, opt, &final);
536 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); 536 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr);
537 fl6.flowi6_oif = sk->sk_bound_dev_if; 537 fl6.flowi6_oif = sk->sk_bound_dev_if;
538 fl6.uli.ports.dport = inet_rsk(req)->rmt_port; 538 fl6.fl6_dport = inet_rsk(req)->rmt_port;
539 fl6.uli.ports.sport = inet_rsk(req)->loc_port; 539 fl6.fl6_sport = inet_rsk(req)->loc_port;
540 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); 540 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
541 541
542 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); 542 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
@@ -957,8 +957,8 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
957 ipv6_addr_copy(&fl6.daddr, &np->daddr); 957 ipv6_addr_copy(&fl6.daddr, &np->daddr);
958 ipv6_addr_copy(&fl6.saddr, saddr ? saddr : &np->saddr); 958 ipv6_addr_copy(&fl6.saddr, saddr ? saddr : &np->saddr);
959 fl6.flowi6_oif = sk->sk_bound_dev_if; 959 fl6.flowi6_oif = sk->sk_bound_dev_if;
960 fl6.uli.ports.dport = usin->sin6_port; 960 fl6.fl6_dport = usin->sin6_port;
961 fl6.uli.ports.sport = inet->inet_sport; 961 fl6.fl6_sport = inet->inet_sport;
962 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); 962 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
963 963
964 final_p = fl6_update_dst(&fl6, np->opt, &final); 964 final_p = fl6_update_dst(&fl6, np->opt, &final);
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 689eea6553fd..4b13d5d8890e 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -661,8 +661,8 @@ int inet6_sk_rebuild_header(struct sock *sk)
661 fl6.flowlabel = np->flow_label; 661 fl6.flowlabel = np->flow_label;
662 fl6.flowi6_oif = sk->sk_bound_dev_if; 662 fl6.flowi6_oif = sk->sk_bound_dev_if;
663 fl6.flowi6_mark = sk->sk_mark; 663 fl6.flowi6_mark = sk->sk_mark;
664 fl6.uli.ports.dport = inet->inet_dport; 664 fl6.fl6_dport = inet->inet_dport;
665 fl6.uli.ports.sport = inet->inet_sport; 665 fl6.fl6_sport = inet->inet_sport;
666 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); 666 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
667 667
668 final_p = fl6_update_dst(&fl6, np->opt, &final); 668 final_p = fl6_update_dst(&fl6, np->opt, &final);
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 04ae676d14ee..16560336eb72 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -151,8 +151,8 @@ ipv4_connected:
151 ipv6_addr_copy(&fl6.saddr, &np->saddr); 151 ipv6_addr_copy(&fl6.saddr, &np->saddr);
152 fl6.flowi6_oif = sk->sk_bound_dev_if; 152 fl6.flowi6_oif = sk->sk_bound_dev_if;
153 fl6.flowi6_mark = sk->sk_mark; 153 fl6.flowi6_mark = sk->sk_mark;
154 fl6.uli.ports.dport = inet->inet_dport; 154 fl6.fl6_dport = inet->inet_dport;
155 fl6.uli.ports.sport = inet->inet_sport; 155 fl6.fl6_sport = inet->inet_sport;
156 156
157 if (!fl6.flowi6_oif && (addr_type&IPV6_ADDR_MULTICAST)) 157 if (!fl6.flowi6_oif && (addr_type&IPV6_ADDR_MULTICAST))
158 fl6.flowi6_oif = np->mcast_oif; 158 fl6.flowi6_oif = np->mcast_oif;
@@ -261,7 +261,7 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info)
261 serr->ee.ee_info = info; 261 serr->ee.ee_info = info;
262 serr->ee.ee_data = 0; 262 serr->ee.ee_data = 0;
263 serr->addr_offset = (u8 *)&iph->daddr - skb_network_header(skb); 263 serr->addr_offset = (u8 *)&iph->daddr - skb_network_header(skb);
264 serr->port = fl6->uli.ports.dport; 264 serr->port = fl6->fl6_dport;
265 265
266 __skb_pull(skb, skb_tail_pointer(skb) - skb->data); 266 __skb_pull(skb, skb_tail_pointer(skb) - skb->data);
267 skb_reset_transport_header(skb); 267 skb_reset_transport_header(skb);
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index f7b9041f7845..83cb4f9add81 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -448,8 +448,8 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
448 if (saddr) 448 if (saddr)
449 ipv6_addr_copy(&fl6.saddr, saddr); 449 ipv6_addr_copy(&fl6.saddr, saddr);
450 fl6.flowi6_oif = iif; 450 fl6.flowi6_oif = iif;
451 fl6.uli.icmpt.type = type; 451 fl6.fl6_icmp_type = type;
452 fl6.uli.icmpt.code = code; 452 fl6.fl6_icmp_code = code;
453 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); 453 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6));
454 454
455 sk = icmpv6_xmit_lock(net); 455 sk = icmpv6_xmit_lock(net);
@@ -544,7 +544,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
544 if (saddr) 544 if (saddr)
545 ipv6_addr_copy(&fl6.saddr, saddr); 545 ipv6_addr_copy(&fl6.saddr, saddr);
546 fl6.flowi6_oif = skb->dev->ifindex; 546 fl6.flowi6_oif = skb->dev->ifindex;
547 fl6.uli.icmpt.type = ICMPV6_ECHO_REPLY; 547 fl6.fl6_icmp_type = ICMPV6_ECHO_REPLY;
548 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); 548 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6));
549 549
550 sk = icmpv6_xmit_lock(net); 550 sk = icmpv6_xmit_lock(net);
@@ -794,8 +794,8 @@ void icmpv6_flow_init(struct sock *sk, struct flowi6 *fl6,
794 ipv6_addr_copy(&fl6->saddr, saddr); 794 ipv6_addr_copy(&fl6->saddr, saddr);
795 ipv6_addr_copy(&fl6->daddr, daddr); 795 ipv6_addr_copy(&fl6->daddr, daddr);
796 fl6->flowi6_proto = IPPROTO_ICMPV6; 796 fl6->flowi6_proto = IPPROTO_ICMPV6;
797 fl6->uli.icmpt.type = type; 797 fl6->fl6_icmp_type = type;
798 fl6->uli.icmpt.code = 0; 798 fl6->fl6_icmp_code = 0;
799 fl6->flowi6_oif = oif; 799 fl6->flowi6_oif = oif;
800 security_sk_classify_flow(sk, flowi6_to_flowi(fl6)); 800 security_sk_classify_flow(sk, flowi6_to_flowi(fl6));
801} 801}
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 27d669160ba6..166054650466 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -70,8 +70,8 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk,
70 ipv6_addr_copy(&fl6.saddr, &treq->loc_addr); 70 ipv6_addr_copy(&fl6.saddr, &treq->loc_addr);
71 fl6.flowi6_oif = sk->sk_bound_dev_if; 71 fl6.flowi6_oif = sk->sk_bound_dev_if;
72 fl6.flowi6_mark = sk->sk_mark; 72 fl6.flowi6_mark = sk->sk_mark;
73 fl6.uli.ports.dport = inet_rsk(req)->rmt_port; 73 fl6.fl6_dport = inet_rsk(req)->rmt_port;
74 fl6.uli.ports.sport = inet_rsk(req)->loc_port; 74 fl6.fl6_sport = inet_rsk(req)->loc_port;
75 security_req_classify_flow(req, flowi6_to_flowi(&fl6)); 75 security_req_classify_flow(req, flowi6_to_flowi(&fl6));
76 76
77 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); 77 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
@@ -220,8 +220,8 @@ int inet6_csk_xmit(struct sk_buff *skb)
220 IP6_ECN_flow_xmit(sk, fl6.flowlabel); 220 IP6_ECN_flow_xmit(sk, fl6.flowlabel);
221 fl6.flowi6_oif = sk->sk_bound_dev_if; 221 fl6.flowi6_oif = sk->sk_bound_dev_if;
222 fl6.flowi6_mark = sk->sk_mark; 222 fl6.flowi6_mark = sk->sk_mark;
223 fl6.uli.ports.sport = inet->inet_sport; 223 fl6.fl6_sport = inet->inet_sport;
224 fl6.uli.ports.dport = inet->inet_dport; 224 fl6.fl6_dport = inet->inet_dport;
225 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); 225 security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
226 226
227 final_p = fl6_update_dst(&fl6, np->opt, &final); 227 final_p = fl6_update_dst(&fl6, np->opt, &final);
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index 6a137355311c..9b210482fb05 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -216,7 +216,7 @@ static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb,
216 int err = 0; 216 int err = 0;
217 217
218 if (unlikely(fl6->flowi6_proto == IPPROTO_MH && 218 if (unlikely(fl6->flowi6_proto == IPPROTO_MH &&
219 fl6->uli.mht.type <= IP6_MH_TYPE_MAX)) 219 fl6->fl6_mh_type <= IP6_MH_TYPE_MAX))
220 goto out; 220 goto out;
221 221
222 if (likely(opt->dsthao)) { 222 if (likely(opt->dsthao)) {
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index df05511dea33..28e74488a329 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -93,8 +93,8 @@ static void send_reset(struct net *net, struct sk_buff *oldskb)
93 fl6.flowi6_proto = IPPROTO_TCP; 93 fl6.flowi6_proto = IPPROTO_TCP;
94 ipv6_addr_copy(&fl6.saddr, &oip6h->daddr); 94 ipv6_addr_copy(&fl6.saddr, &oip6h->daddr);
95 ipv6_addr_copy(&fl6.daddr, &oip6h->saddr); 95 ipv6_addr_copy(&fl6.daddr, &oip6h->saddr);
96 fl6.uli.ports.sport = otcph.dest; 96 fl6.fl6_sport = otcph.dest;
97 fl6.uli.ports.dport = otcph.source; 97 fl6.fl6_dport = otcph.source;
98 security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6)); 98 security_skb_classify_flow(oldskb, flowi6_to_flowi(&fl6));
99 dst = ip6_route_output(net, NULL, &fl6); 99 dst = ip6_route_output(net, NULL, &fl6);
100 if (dst == NULL || dst->error) { 100 if (dst == NULL || dst->error) {
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 259f1b231038..4a1c3b46c56b 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -693,8 +693,8 @@ static int rawv6_probe_proto_opt(struct flowi6 *fl6, struct msghdr *msg)
693 code = iov->iov_base; 693 code = iov->iov_base;
694 694
695 if (type && code) { 695 if (type && code) {
696 if (get_user(fl6->uli.icmpt.type, type) || 696 if (get_user(fl6->fl6_icmp_type, type) ||
697 get_user(fl6->uli.icmpt.code, code)) 697 get_user(fl6->fl6_icmp_code, code))
698 return -EFAULT; 698 return -EFAULT;
699 probed = 1; 699 probed = 1;
700 } 700 }
@@ -705,7 +705,7 @@ static int rawv6_probe_proto_opt(struct flowi6 *fl6, struct msghdr *msg)
705 /* check if type field is readable or not. */ 705 /* check if type field is readable or not. */
706 if (iov->iov_len > 2 - len) { 706 if (iov->iov_len > 2 - len) {
707 u8 __user *p = iov->iov_base; 707 u8 __user *p = iov->iov_base;
708 if (get_user(fl6->uli.mht.type, &p[2 - len])) 708 if (get_user(fl6->fl6_mh_type, &p[2 - len]))
709 return -EFAULT; 709 return -EFAULT;
710 probed = 1; 710 probed = 1;
711 } else 711 } else
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 97858d5d67e8..352c26081f5d 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -240,8 +240,8 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
240 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr); 240 ipv6_addr_copy(&fl6.saddr, &ireq6->loc_addr);
241 fl6.flowi6_oif = sk->sk_bound_dev_if; 241 fl6.flowi6_oif = sk->sk_bound_dev_if;
242 fl6.flowi6_mark = sk->sk_mark; 242 fl6.flowi6_mark = sk->sk_mark;
243 fl6.uli.ports.dport = inet_rsk(req)->rmt_port; 243 fl6.fl6_dport = inet_rsk(req)->rmt_port;
244 fl6.uli.ports.sport = inet_sk(sk)->inet_sport; 244 fl6.fl6_sport = inet_sk(sk)->inet_sport;
245 security_req_classify_flow(req, flowi6_to_flowi(&fl6)); 245 security_req_classify_flow(req, flowi6_to_flowi(&fl6));
246 246
247 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); 247 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 7ed0ba1995f0..2b0c186862c8 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -248,8 +248,8 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
248 (saddr ? saddr : &np->saddr)); 248 (saddr ? saddr : &np->saddr));
249 fl6.flowi6_oif = sk->sk_bound_dev_if; 249 fl6.flowi6_oif = sk->sk_bound_dev_if;
250 fl6.flowi6_mark = sk->sk_mark; 250 fl6.flowi6_mark = sk->sk_mark;
251 fl6.uli.ports.dport = usin->sin6_port; 251 fl6.fl6_dport = usin->sin6_port;
252 fl6.uli.ports.sport = inet->inet_sport; 252 fl6.fl6_sport = inet->inet_sport;
253 253
254 final_p = fl6_update_dst(&fl6, np->opt, &final); 254 final_p = fl6_update_dst(&fl6, np->opt, &final);
255 255
@@ -401,8 +401,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
401 ipv6_addr_copy(&fl6.saddr, &np->saddr); 401 ipv6_addr_copy(&fl6.saddr, &np->saddr);
402 fl6.flowi6_oif = sk->sk_bound_dev_if; 402 fl6.flowi6_oif = sk->sk_bound_dev_if;
403 fl6.flowi6_mark = sk->sk_mark; 403 fl6.flowi6_mark = sk->sk_mark;
404 fl6.uli.ports.dport = inet->inet_dport; 404 fl6.fl6_dport = inet->inet_dport;
405 fl6.uli.ports.sport = inet->inet_sport; 405 fl6.fl6_sport = inet->inet_sport;
406 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); 406 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6));
407 407
408 dst = ip6_dst_lookup_flow(sk, &fl6, NULL, false); 408 dst = ip6_dst_lookup_flow(sk, &fl6, NULL, false);
@@ -493,8 +493,8 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
493 fl6.flowlabel = 0; 493 fl6.flowlabel = 0;
494 fl6.flowi6_oif = treq->iif; 494 fl6.flowi6_oif = treq->iif;
495 fl6.flowi6_mark = sk->sk_mark; 495 fl6.flowi6_mark = sk->sk_mark;
496 fl6.uli.ports.dport = inet_rsk(req)->rmt_port; 496 fl6.fl6_dport = inet_rsk(req)->rmt_port;
497 fl6.uli.ports.sport = inet_rsk(req)->loc_port; 497 fl6.fl6_sport = inet_rsk(req)->loc_port;
498 security_req_classify_flow(req, flowi6_to_flowi(&fl6)); 498 security_req_classify_flow(req, flowi6_to_flowi(&fl6));
499 499
500 opt = np->opt; 500 opt = np->opt;
@@ -1057,8 +1057,8 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
1057 1057
1058 fl6.flowi6_proto = IPPROTO_TCP; 1058 fl6.flowi6_proto = IPPROTO_TCP;
1059 fl6.flowi6_oif = inet6_iif(skb); 1059 fl6.flowi6_oif = inet6_iif(skb);
1060 fl6.uli.ports.dport = t1->dest; 1060 fl6.fl6_dport = t1->dest;
1061 fl6.uli.ports.sport = t1->source; 1061 fl6.fl6_sport = t1->source;
1062 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6)); 1062 security_skb_classify_flow(skb, flowi6_to_flowi(&fl6));
1063 1063
1064 /* Pass a socket to ip6_dst_lookup either it is for RST 1064 /* Pass a socket to ip6_dst_lookup either it is for RST
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index ce4b16fbf81c..d7037c006e13 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -899,8 +899,8 @@ static int udp_v6_push_pending_frames(struct sock *sk)
899 * Create a UDP header 899 * Create a UDP header
900 */ 900 */
901 uh = udp_hdr(skb); 901 uh = udp_hdr(skb);
902 uh->source = fl6->uli.ports.sport; 902 uh->source = fl6->fl6_sport;
903 uh->dest = fl6->uli.ports.dport; 903 uh->dest = fl6->fl6_dport;
904 uh->len = htons(up->len); 904 uh->len = htons(up->len);
905 uh->check = 0; 905 uh->check = 0;
906 906
@@ -1036,7 +1036,7 @@ do_udp_sendmsg:
1036 if (sin6->sin6_port == 0) 1036 if (sin6->sin6_port == 0)
1037 return -EINVAL; 1037 return -EINVAL;
1038 1038
1039 fl6.uli.ports.dport = sin6->sin6_port; 1039 fl6.fl6_dport = sin6->sin6_port;
1040 daddr = &sin6->sin6_addr; 1040 daddr = &sin6->sin6_addr;
1041 1041
1042 if (np->sndflow) { 1042 if (np->sndflow) {
@@ -1065,7 +1065,7 @@ do_udp_sendmsg:
1065 if (sk->sk_state != TCP_ESTABLISHED) 1065 if (sk->sk_state != TCP_ESTABLISHED)
1066 return -EDESTADDRREQ; 1066 return -EDESTADDRREQ;
1067 1067
1068 fl6.uli.ports.dport = inet->inet_dport; 1068 fl6.fl6_dport = inet->inet_dport;
1069 daddr = &np->daddr; 1069 daddr = &np->daddr;
1070 fl6.flowlabel = np->flow_label; 1070 fl6.flowlabel = np->flow_label;
1071 connected = 1; 1071 connected = 1;
@@ -1112,7 +1112,7 @@ do_udp_sendmsg:
1112 fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ 1112 fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */
1113 if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) 1113 if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr))
1114 ipv6_addr_copy(&fl6.saddr, &np->saddr); 1114 ipv6_addr_copy(&fl6.saddr, &np->saddr);
1115 fl6.uli.ports.sport = inet->inet_sport; 1115 fl6.fl6_sport = inet->inet_sport;
1116 1116
1117 final_p = fl6_update_dst(&fl6, opt, &final); 1117 final_p = fl6_update_dst(&fl6, opt, &final);
1118 if (final_p) 1118 if (final_p)
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index bef62005c0ed..05e34c8ec913 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -160,8 +160,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
160 pskb_may_pull(skb, nh + offset + 4 - skb->data))) { 160 pskb_may_pull(skb, nh + offset + 4 - skb->data))) {
161 __be16 *ports = (__be16 *)exthdr; 161 __be16 *ports = (__be16 *)exthdr;
162 162
163 fl6->uli.ports.sport = ports[!!reverse]; 163 fl6->fl6_sport = ports[!!reverse];
164 fl6->uli.ports.dport = ports[!reverse]; 164 fl6->fl6_dport = ports[!reverse];
165 } 165 }
166 fl6->flowi6_proto = nexthdr; 166 fl6->flowi6_proto = nexthdr;
167 return; 167 return;
@@ -170,8 +170,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
170 if (!onlyproto && pskb_may_pull(skb, nh + offset + 2 - skb->data)) { 170 if (!onlyproto && pskb_may_pull(skb, nh + offset + 2 - skb->data)) {
171 u8 *icmp = (u8 *)exthdr; 171 u8 *icmp = (u8 *)exthdr;
172 172
173 fl6->uli.icmpt.type = icmp[0]; 173 fl6->fl6_icmp_type = icmp[0];
174 fl6->uli.icmpt.code = icmp[1]; 174 fl6->fl6_icmp_code = icmp[1];
175 } 175 }
176 fl6->flowi6_proto = nexthdr; 176 fl6->flowi6_proto = nexthdr;
177 return; 177 return;
@@ -182,7 +182,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
182 struct ip6_mh *mh; 182 struct ip6_mh *mh;
183 mh = (struct ip6_mh *)exthdr; 183 mh = (struct ip6_mh *)exthdr;
184 184
185 fl6->uli.mht.type = mh->ip6mh_type; 185 fl6->fl6_mh_type = mh->ip6mh_type;
186 } 186 }
187 fl6->flowi6_proto = nexthdr; 187 fl6->flowi6_proto = nexthdr;
188 return; 188 return;
@@ -193,7 +193,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
193 case IPPROTO_ESP: 193 case IPPROTO_ESP:
194 case IPPROTO_COMP: 194 case IPPROTO_COMP:
195 default: 195 default:
196 fl6->uli.spi = 0; 196 fl6->fl6_ipsec_spi = 0;
197 fl6->flowi6_proto = nexthdr; 197 fl6->flowi6_proto = nexthdr;
198 return; 198 return;
199 } 199 }