aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:29:39 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 15:08:44 -0800
commit1d28f42c1bd4bb2363d88df74d0128b4da135b4a (patch)
treecb2e652fe79a2bc307e871bc2d3fa51cc8051e45 /net/ipv6
parentca116922afa8cc5ad46b00c0a637b1cde5ca478a (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/ipv6')
-rw-r--r--net/ipv6/af_inet6.c6
-rw-r--r--net/ipv6/datagram.c20
-rw-r--r--net/ipv6/icmp.c24
-rw-r--r--net/ipv6/inet6_connection_sock.c12
-rw-r--r--net/ipv6/ip6_flowlabel.c2
-rw-r--r--net/ipv6/ip6_output.c10
-rw-r--r--net/ipv6/ip6_tunnel.c8
-rw-r--r--net/ipv6/ip6mr.c22
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/mip6.c6
-rw-r--r--net/ipv6/netfilter.c4
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c2
-rw-r--r--net/ipv6/raw.c20
-rw-r--r--net/ipv6/route.c20
-rw-r--r--net/ipv6/syncookies.c6
-rw-r--r--net/ipv6/tcp_ipv6.c22
-rw-r--r--net/ipv6/udp.c20
-rw-r--r--net/ipv6/xfrm6_policy.c10
-rw-r--r--net/ipv6/xfrm6_state.c4
19 files changed, 111 insertions, 111 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index a88b2e9d25f..35b0be0463f 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -655,12 +655,12 @@ int inet6_sk_rebuild_header(struct sock *sk)
struct flowi fl;
memset(&fl, 0, sizeof(fl));
- fl.proto = sk->sk_protocol;
+ fl.flowi_proto = sk->sk_protocol;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
fl.fl6_flowlabel = np->flow_label;
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet->inet_dport;
fl.fl_ip_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index be3a781c008..6c24b26f67e 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -146,16 +146,16 @@ ipv4_connected:
* destination cache for it.
*/
- fl.proto = sk->sk_protocol;
+ fl.flowi_proto = sk->sk_protocol;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet->inet_dport;
fl.fl_ip_sport = inet->inet_sport;
- if (!fl.oif && (addr_type&IPV6_ADDR_MULTICAST))
- fl.oif = np->mcast_oif;
+ if (!fl.flowi_oif && (addr_type&IPV6_ADDR_MULTICAST))
+ fl.flowi_oif = np->mcast_oif;
security_sk_classify_flow(sk, &fl);
@@ -299,7 +299,7 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi *fl, u32 mtu)
mtu_info->ip6m_addr.sin6_family = AF_INET6;
mtu_info->ip6m_addr.sin6_port = 0;
mtu_info->ip6m_addr.sin6_flowinfo = 0;
- mtu_info->ip6m_addr.sin6_scope_id = fl->oif;
+ mtu_info->ip6m_addr.sin6_scope_id = fl->flowi_oif;
ipv6_addr_copy(&mtu_info->ip6m_addr.sin6_addr, &ipv6_hdr(skb)->daddr);
__skb_pull(skb, skb_tail_pointer(skb) - skb->data);
@@ -629,16 +629,16 @@ int datagram_send_ctl(struct net *net,
src_info = (struct in6_pktinfo *)CMSG_DATA(cmsg);
if (src_info->ipi6_ifindex) {
- if (fl->oif && src_info->ipi6_ifindex != fl->oif)
+ if (fl->flowi_oif && src_info->ipi6_ifindex != fl->flowi_oif)
return -EINVAL;
- fl->oif = src_info->ipi6_ifindex;
+ fl->flowi_oif = src_info->ipi6_ifindex;
}
addr_type = __ipv6_addr_type(&src_info->ipi6_addr);
rcu_read_lock();
- if (fl->oif) {
- dev = dev_get_by_index_rcu(net, fl->oif);
+ if (fl->flowi_oif) {
+ dev = dev_get_by_index_rcu(net, fl->flowi_oif);
if (!dev) {
rcu_read_unlock();
return -ENODEV;
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 55665956b3a..9e123e08b9b 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -235,7 +235,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
sizeof(struct icmp6hdr), skb->csum);
icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst,
- len, fl->proto,
+ len, fl->flowi_proto,
skb->csum);
} else {
__wsum tmp_csum = 0;
@@ -248,7 +248,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
sizeof(struct icmp6hdr), tmp_csum);
icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst,
- len, fl->proto,
+ len, fl->flowi_proto,
tmp_csum);
}
ip6_push_pending_frames(sk);
@@ -443,11 +443,11 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
mip6_addr_swap(skb);
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_ICMPV6;
+ fl.flowi_proto = IPPROTO_ICMPV6;
ipv6_addr_copy(&fl.fl6_dst, &hdr->saddr);
if (saddr)
ipv6_addr_copy(&fl.fl6_src, saddr);
- fl.oif = iif;
+ fl.flowi_oif = iif;
fl.fl_icmp_type = type;
fl.fl_icmp_code = code;
security_skb_classify_flow(skb, &fl);
@@ -465,8 +465,8 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
tmp_hdr.icmp6_cksum = 0;
tmp_hdr.icmp6_pointer = htonl(info);
- if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst))
- fl.oif = np->mcast_oif;
+ if (!fl.flowi_oif && ipv6_addr_is_multicast(&fl.fl6_dst))
+ fl.flowi_oif = np->mcast_oif;
dst = icmpv6_route_lookup(net, skb, sk, &fl);
if (IS_ERR(dst))
@@ -539,11 +539,11 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
tmp_hdr.icmp6_type = ICMPV6_ECHO_REPLY;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_ICMPV6;
+ fl.flowi_proto = IPPROTO_ICMPV6;
ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr);
if (saddr)
ipv6_addr_copy(&fl.fl6_src, saddr);
- fl.oif = skb->dev->ifindex;
+ fl.flowi_oif = skb->dev->ifindex;
fl.fl_icmp_type = ICMPV6_ECHO_REPLY;
security_skb_classify_flow(skb, &fl);
@@ -552,8 +552,8 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
return;
np = inet6_sk(sk);
- if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst))
- fl.oif = np->mcast_oif;
+ if (!fl.flowi_oif && ipv6_addr_is_multicast(&fl.fl6_dst))
+ fl.flowi_oif = np->mcast_oif;
err = ip6_dst_lookup(sk, &dst, &fl);
if (err)
@@ -793,10 +793,10 @@ void icmpv6_flow_init(struct sock *sk, struct flowi *fl,
memset(fl, 0, sizeof(*fl));
ipv6_addr_copy(&fl->fl6_src, saddr);
ipv6_addr_copy(&fl->fl6_dst, daddr);
- fl->proto = IPPROTO_ICMPV6;
+ fl->flowi_proto = IPPROTO_ICMPV6;
fl->fl_icmp_type = type;
fl->fl_icmp_code = 0;
- fl->oif = oif;
+ fl->flowi_oif = oif;
security_sk_classify_flow(sk, fl);
}
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index d687e139733..673f9bf2895 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -64,12 +64,12 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk,
struct flowi fl;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_dst, &treq->rmt_addr);
final_p = fl6_update_dst(&fl, np->opt, &final);
ipv6_addr_copy(&fl.fl6_src, &treq->loc_addr);
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet_rsk(req)->rmt_port;
fl.fl_ip_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
@@ -213,13 +213,13 @@ int inet6_csk_xmit(struct sk_buff *skb)
struct in6_addr *final_p, final;
memset(&fl, 0, sizeof(fl));
- fl.proto = sk->sk_protocol;
+ fl.flowi_proto = sk->sk_protocol;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
fl.fl6_flowlabel = np->flow_label;
IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel);
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_sport = inet->inet_sport;
fl.fl_ip_dport = inet->inet_dport;
security_sk_classify_flow(sk, &fl);
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index 13654686aea..c8fa470b174 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -358,7 +358,7 @@ fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval,
msg.msg_controllen = olen;
msg.msg_control = (void*)(fl->opt+1);
- flowi.oif = 0;
+ flowi.flowi_oif = 0;
err = datagram_send_ctl(net, &msg, &flowi, fl->opt, &junk,
&junk, &junk);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index adaffaf8455..3d0f2ac868a 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -182,7 +182,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
struct in6_addr *first_hop = &fl->fl6_dst;
struct dst_entry *dst = skb_dst(skb);
struct ipv6hdr *hdr;
- u8 proto = fl->proto;
+ u8 proto = fl->flowi_proto;
int seg_len = skb->len;
int hlimit = -1;
int tclass = 0;
@@ -908,7 +908,7 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk,
#ifdef CONFIG_IPV6_SUBTREES
ip6_rt_check(&rt->rt6i_src, &fl->fl6_src, np->saddr_cache) ||
#endif
- (fl->oif && fl->oif != dst->dev->ifindex)) {
+ (fl->flowi_oif && fl->flowi_oif != dst->dev->ifindex)) {
dst_release(dst);
dst = NULL;
}
@@ -1026,7 +1026,7 @@ struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi *fl,
if (final_dst)
ipv6_addr_copy(&fl->fl6_dst, final_dst);
if (can_sleep)
- fl->flags |= FLOWI_FLAG_CAN_SLEEP;
+ fl->flowi_flags |= FLOWI_FLAG_CAN_SLEEP;
return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
}
@@ -1062,7 +1062,7 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi *fl,
if (final_dst)
ipv6_addr_copy(&fl->fl6_dst, final_dst);
if (can_sleep)
- fl->flags |= FLOWI_FLAG_CAN_SLEEP;
+ fl->flowi_flags |= FLOWI_FLAG_CAN_SLEEP;
return xfrm_lookup(sock_net(sk), dst, fl, sk, 0);
}
@@ -1517,7 +1517,7 @@ int ip6_push_pending_frames(struct sock *sk)
struct ipv6_txoptions *opt = np->cork.opt;
struct rt6_info *rt = (struct rt6_info *)inet->cork.dst;
struct flowi *fl = &inet->cork.fl;
- unsigned char proto = fl->proto;
+ unsigned char proto = fl->flowi_proto;
int err = 0;
if ((skb = __skb_dequeue(&sk->sk_write_queue)) == NULL)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index f199b848612..c3fc824c24d 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -963,7 +963,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
skb->transport_header = skb->network_header;
- proto = fl->proto;
+ proto = fl->flowi_proto;
if (encap_limit >= 0) {
init_tel_txopt(&opt, encap_limit);
ipv6_push_nfrag_opts(skb, &opt.ops, &proto, NULL);
@@ -1020,7 +1020,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
encap_limit = t->parms.encap_limit;
memcpy(&fl, &t->fl, sizeof (fl));
- fl.proto = IPPROTO_IPIP;
+ fl.flowi_proto = IPPROTO_IPIP;
dsfield = ipv4_get_dsfield(iph);
@@ -1070,7 +1070,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
encap_limit = t->parms.encap_limit;
memcpy(&fl, &t->fl, sizeof (fl));
- fl.proto = IPPROTO_IPV6;
+ fl.flowi_proto = IPPROTO_IPV6;
dsfield = ipv6_get_dsfield(ipv6h);
if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
@@ -1149,7 +1149,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t)
/* Set up flowi template */
ipv6_addr_copy(&fl->fl6_src, &p->laddr);
ipv6_addr_copy(&fl->fl6_dst, &p->raddr);
- fl->oif = p->link;
+ fl->flowi_oif = p->link;
fl->fl6_flowlabel = 0;
if (!(p->flags&IP6_TNL_F_USE_ORIG_TCLASS))
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 618f67ccda3..61a8be3ac4e 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -618,8 +618,8 @@ static int pim6_rcv(struct sk_buff *skb)
struct net *net = dev_net(skb->dev);
struct mr6_table *mrt;
struct flowi fl = {
- .iif = skb->dev->ifindex,
- .mark = skb->mark,
+ .flowi_iif = skb->dev->ifindex,
+ .flowi_mark = skb->mark,
};
int reg_vif_num;
@@ -688,9 +688,9 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
struct net *net = dev_net(dev);
struct mr6_table *mrt;
struct flowi fl = {
- .oif = dev->ifindex,
- .iif = skb->skb_iif,
- .mark = skb->mark,
+ .flowi_oif = dev->ifindex,
+ .flowi_iif = skb->skb_iif,
+ .flowi_mark = skb->mark,
};
int err;
@@ -1548,9 +1548,9 @@ struct sock *mroute6_socket(struct net *net, struct sk_buff *skb)
{
struct mr6_table *mrt;
struct flowi fl = {
- .iif = skb->skb_iif,
- .oif = skb->dev->ifindex,
- .mark = skb->mark,
+ .flowi_iif = skb->skb_iif,
+ .flowi_oif = skb->dev->ifindex,
+ .flowi_mark= skb->mark,
};
if (ip6mr_fib_lookup(net, &fl, &mrt) < 0)
@@ -1916,7 +1916,7 @@ static int ip6mr_forward2(struct net *net, struct mr6_table *mrt,
ipv6h = ipv6_hdr(skb);
fl = (struct flowi) {
- .oif = vif->link,
+ .flowi_oif = vif->link,
.fl6_dst = ipv6h->daddr,
};
@@ -2044,8 +2044,8 @@ int ip6_mr_input(struct sk_buff *skb)
struct net *net = dev_net(skb->dev);
struct mr6_table *mrt;
struct flowi fl = {
- .iif = skb->dev->ifindex,
- .mark = skb->mark,
+ .flowi_iif = skb->dev->ifindex,
+ .flowi_mark= skb->mark,
};
int err;
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index d1770e061c0..1448c507fdf 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -448,8 +448,8 @@ sticky_done:
int junk;
fl.fl6_flowlabel = 0;
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
if (optlen == 0)
goto update;
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index f3e3ca938a5..e2f852cd0f4 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -214,7 +214,7 @@ static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb,
struct timeval stamp;
int err = 0;
- if (unlikely(fl->proto == IPPROTO_MH &&
+ if (unlikely(fl->flowi_proto == IPPROTO_MH &&
fl->fl_mh_type <= IP6_MH_TYPE_MAX))
goto out;
@@ -240,14 +240,14 @@ static int mip6_destopt_reject(struct xfrm_state *x, struct sk_buff *skb,
sizeof(sel.saddr));
sel.prefixlen_s = 128;
sel.family = AF_INET6;
- sel.proto = fl->proto;
+ sel.proto = fl->flowi_proto;
sel.dport = xfrm_flowi_dport(fl);
if (sel.dport)
sel.dport_mask = htons(~0);
sel.sport = xfrm_flowi_sport(fl);
if (sel.sport)
sel.sport_mask = htons(~0);
- sel.ifindex = fl->oif;
+ sel.ifindex = fl->flowi_oif;
err = km_report(net, IPPROTO_DSTOPTS, &sel,
(hao ? (xfrm_address_t *)&hao->addr : NULL));
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index 8d74116ae27..d282c62bc6f 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -16,8 +16,8 @@ int ip6_route_me_harder(struct sk_buff *skb)
struct ipv6hdr *iph = ipv6_hdr(skb);
struct dst_entry *dst;
struct flowi fl = {
- .oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
- .mark = skb->mark,
+ .flowi_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0,
+ .flowi_mark = skb->mark,
.fl6_dst = iph->daddr,
.fl6_src = iph->saddr,
};
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index 91f6a61cefa..fd3938803eb 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -90,7 +90,7 @@ static void send_reset(struct net *net, struct sk_buff *oldskb)
}
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_src, &oip6h->daddr);
ipv6_addr_copy(&fl.fl6_dst, &oip6h->saddr);
fl.fl_ip_sport = otcph.dest;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index dc29b07caf4..323ad44ff77 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -588,9 +588,9 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
csum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst,
- total_len, fl->proto, tmp_csum);
+ total_len, fl->flowi_proto, tmp_csum);
- if (csum == 0 && fl->proto == IPPROTO_UDP)
+ if (csum == 0 && fl->flowi_proto == IPPROTO_UDP)
csum = CSUM_MANGLED_0;
if (skb_store_bits(skb, offset, &csum, 2))
@@ -679,7 +679,7 @@ static int rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
if (!iov)
continue;
- switch (fl->proto) {
+ switch (fl->flowi_proto) {
case IPPROTO_ICMPV6:
/* check if one-byte field is readable or not. */
if (iov->iov_base && iov->iov_len < 1)
@@ -758,7 +758,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
*/
memset(&fl, 0, sizeof(fl));
- fl.mark = sk->sk_mark;
+ fl.flowi_mark = sk->sk_mark;
if (sin6) {
if (addr_len < SIN6_LEN_RFC2133)
@@ -800,7 +800,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if (addr_len >= sizeof(struct sockaddr_in6) &&
sin6->sin6_scope_id &&
ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
- fl.oif = sin6->sin6_scope_id;
+ fl.flowi_oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
return -EDESTADDRREQ;
@@ -810,8 +810,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
fl.fl6_flowlabel = np->flow_label;
}
- if (fl.oif == 0)
- fl.oif = sk->sk_bound_dev_if;
+ if (fl.flowi_oif == 0)
+ fl.flowi_oif = sk->sk_bound_dev_if;
if (msg->msg_controllen) {
opt = &opt_space;
@@ -838,7 +838,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
opt = fl6_merge_options(&opt_space, flowlabel, opt);
opt = ipv6_fixup_options(&opt_space, opt);
- fl.proto = proto;
+ fl.flowi_proto = proto;
err = rawv6_probe_proto_opt(&fl, msg);
if (err)
goto out;
@@ -852,8 +852,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
final_p = fl6_update_dst(&fl, opt, &final);
- if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst))
- fl.oif = np->mcast_oif;
+ if (!fl.flowi_oif && ipv6_addr_is_multicast(&fl.fl6_dst))
+ fl.flowi_oif = np->mcast_oif;
security_sk_classify_flow(sk, &fl);
dst = ip6_dst_lookup_flow(sk, &fl, final_p, true);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 001276055a6..c3b20d63921 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -608,7 +608,7 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net,
fn = fib6_lookup(&table->tb6_root, &fl->fl6_dst, &fl->fl6_src);
restart:
rt = fn->leaf;
- rt = rt6_device_match(net, rt, &fl->fl6_src, fl->oif, flags);
+ rt = rt6_device_match(net, rt, &fl->fl6_src, fl->flowi_oif, flags);
BACKTRACK(net, &fl->fl6_src);
out:
dst_use(&rt->dst, jiffies);
@@ -621,7 +621,7 @@ struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
const struct in6_addr *saddr, int oif, int strict)
{
struct flowi fl = {
- .oif = oif,
+ .flowi_oif = oif,
.fl6_dst = *daddr,
};
struct dst_entry *dst;
@@ -825,7 +825,7 @@ out2:
static struct rt6_info *ip6_pol_route_input(struct net *net, struct fib6_table *table,
struct flowi *fl, int flags)
{
- return ip6_pol_route(net, table, fl->iif, fl, flags);
+ return ip6_pol_route(net, table, fl->flowi_iif, fl, flags);
}
void ip6_route_input(struct sk_buff *skb)
@@ -834,12 +834,12 @@ void ip6_route_input(struct sk_buff *skb)
struct net *net = dev_net(skb->dev);
int flags = RT6_LOOKUP_F_HAS_SADDR;
struct flowi fl = {
- .iif = skb->dev->ifindex,
+ .flowi_iif = skb->dev->ifindex,
.fl6_dst = iph->daddr,
.fl6_src = iph->saddr,
.fl6_flowlabel = (* (__be32 *) iph)&IPV6_FLOWINFO_MASK,
- .mark = skb->mark,
- .proto = iph->nexthdr,
+ .flowi_mark = skb->mark,
+ .flowi_proto = iph->nexthdr,
};
if (rt6_need_strict(&iph->daddr) && skb->dev->type != ARPHRD_PIMREG)
@@ -851,7 +851,7 @@ void ip6_route_input(struct sk_buff *skb)
static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table *table,
struct flowi *fl, int flags)
{
- return ip6_pol_route(net, table, fl->oif, fl, flags);
+ return ip6_pol_route(net, table, fl->flowi_oif, fl, flags);
}
struct dst_entry * ip6_route_output(struct net *net, struct sock *sk,
@@ -1484,7 +1484,7 @@ restart:
continue;
if (!(rt->rt6i_flags & RTF_GATEWAY))
continue;
- if (fl->oif != rt->rt6i_dev->ifindex)
+ if (fl->flowi_oif != rt->rt6i_dev->ifindex)
continue;
if (!ipv6_addr_equal(&rdfl->gateway, &rt->rt6i_gateway))
continue;
@@ -1511,7 +1511,7 @@ static struct rt6_info *ip6_route_redirect(struct in6_addr *dest,
struct net *net = dev_net(dev);
struct ip6rd_flowi rdfl = {
.fl = {
- .oif = dev->ifindex,
+ .flowi_oif = dev->ifindex,
.fl6_dst = *dest,
.fl6_src = *src,
},
@@ -2413,7 +2413,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void
iif = nla_get_u32(tb[RTA_IIF]);
if (tb[RTA_OIF])
- fl.oif = nla_get_u32(tb[RTA_OIF]);
+ fl.flowi_oif = nla_get_u32(tb[RTA_OIF]);
if (iif) {
struct net_device *dev;
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 0b4cf350631..ca5255c0837 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -234,12 +234,12 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
struct in6_addr *final_p, final;
struct flowi fl;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr);
final_p = fl6_update_dst(&fl, np->opt, &final);
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet_rsk(req)->rmt_port;
fl.fl_ip_sport = inet_sk(sk)->inet_sport;
security_req_classify_flow(req, &fl);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index e59a31c48ba..a3d1229b400 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -242,12 +242,12 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
if (!ipv6_addr_any(&np->rcv_saddr))
saddr = &np->rcv_saddr;
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src,
(saddr ? saddr : &np->saddr));
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = usin->sin6_port;
fl.fl_ip_sport = inet->inet_sport;
@@ -396,11 +396,11 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
for now.
*/
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
- fl.oif = sk->sk_bound_dev_if;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = sk->sk_bound_dev_if;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet->inet_dport;
fl.fl_ip_sport = inet->inet_sport;
security_skb_classify_flow(skb, &fl);
@@ -487,12 +487,12 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
int err;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_TCP;
+ fl.flowi_proto = IPPROTO_TCP;
ipv6_addr_copy(&fl.fl6_dst, &treq->rmt_addr);
ipv6_addr_copy(&fl.fl6_src, &treq->loc_addr);
fl.fl6_flowlabel = 0;
- fl.oif = treq->iif;
- fl.mark = sk->sk_mark;
+ fl.flowi_oif = treq->iif;
+ fl.flowi_mark = sk->sk_mark;
fl.fl_ip_dport = inet_rsk(req)->rmt_port;
fl.fl_ip_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
@@ -1055,8 +1055,8 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
__tcp_v6_send_check(buff, &fl.fl6_src, &fl.fl6_dst);
- fl.proto = IPPROTO_TCP;
- fl.oif = inet6_iif(skb);
+ fl.flowi_proto = IPPROTO_TCP;
+ fl.flowi_oif = inet6_iif(skb);
fl.fl_ip_dport = t1->dest;
fl.fl_ip_sport = t1->source;
security_skb_classify_flow(skb, &fl);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index d86d7f67a59..91f8047463e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -915,7 +915,7 @@ static int udp_v6_push_pending_frames(struct sock *sk)
/* add protocol-dependent pseudo-header */
uh->check = csum_ipv6_magic(&fl->fl6_src, &fl->fl6_dst,
- up->len, fl->proto, csum );
+ up->len, fl->flowi_proto, csum);
if (uh->check == 0)
uh->check = CSUM_MANGLED_0;
@@ -1060,7 +1060,7 @@ do_udp_sendmsg:
if (addr_len >= sizeof(struct sockaddr_in6) &&
sin6->sin6_scope_id &&
ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
- fl.oif = sin6->sin6_scope_id;
+ fl.flowi_oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
return -EDESTADDRREQ;
@@ -1071,13 +1071,13 @@ do_udp_sendmsg:
connected = 1;
}
- if (!fl.oif)
- fl.oif = sk->sk_bound_dev_if;
+ if (!fl.flowi_oif)
+ fl.flowi_oif = sk->sk_bound_dev_if;
- if (!fl.oif)
- fl.oif = np->sticky_pktinfo.ipi6_ifindex;
+ if (!fl.flowi_oif)
+ fl.flowi_oif = np->sticky_pktinfo.ipi6_ifindex;
- fl.mark = sk->sk_mark;
+ fl.flowi_mark = sk->sk_mark;
if (msg->msg_controllen) {
opt = &opt_space;
@@ -1105,7 +1105,7 @@ do_udp_sendmsg:
opt = fl6_merge_options(&opt_space, flowlabel, opt);
opt = ipv6_fixup_options(&opt_space, opt);
- fl.proto = sk->sk_protocol;
+ fl.flowi_proto = sk->sk_protocol;
if (!ipv6_addr_any(daddr))
ipv6_addr_copy(&fl.fl6_dst, daddr);
else
@@ -1118,8 +1118,8 @@ do_udp_sendmsg:
if (final_p)
connected = 0;
- if (!fl.oif && ipv6_addr_is_multicast(&fl.fl6_dst)) {
- fl.oif = np->mcast_oif;
+ if (!fl.flowi_oif && ipv6_addr_is_multicast(&fl.fl6_dst)) {
+ fl.flowi_oif = np->mcast_oif;
connected = 0;
}
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 48ce496802f..d62496c1a6f 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -128,7 +128,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
u8 nexthdr = nh[IP6CB(skb)->nhoff];
memset(fl, 0, sizeof(struct flowi));
- fl->mark = skb->mark;
+ fl->flowi_mark = skb->mark;
ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr);
ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr);
@@ -161,7 +161,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
fl->fl_ip_sport = ports[!!reverse];
fl->fl_ip_dport = ports[!reverse];
}
- fl->proto = nexthdr;
+ fl->flowi_proto = nexthdr;
return;
case IPPROTO_ICMPV6:
@@ -171,7 +171,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
fl->fl_icmp_type = icmp[0];
fl->fl_icmp_code = icmp[1];
}
- fl->proto = nexthdr;
+ fl->flowi_proto = nexthdr;
return;
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
@@ -182,7 +182,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
fl->fl_mh_type = mh->ip6mh_type;
}
- fl->proto = nexthdr;
+ fl->flowi_proto = nexthdr;
return;
#endif
@@ -192,7 +192,7 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse)
case IPPROTO_COMP:
default:
fl->fl_ipsec_spi = 0;
- fl->proto = nexthdr;
+ fl->flowi_proto = nexthdr;
return;
}
}
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index a02598e0079..805d0e14c33 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -33,8 +33,8 @@ __xfrm6_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl)
sel->family = AF_INET6;
sel->prefixlen_d = 128;
sel->prefixlen_s = 128;
- sel->proto = fl->proto;
- sel->ifindex = fl->oif;
+ sel->proto = fl->flowi_proto;
+ sel->ifindex = fl->flowi_oif;
}
static void