aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_frontend.c12
-rw-r--r--net/ipv4/fib_semantics.c2
-rw-r--r--net/ipv4/fib_trie.c2
-rw-r--r--net/ipv4/icmp.c12
-rw-r--r--net/ipv4/inet_connection_sock.c22
-rw-r--r--net/ipv4/ip_output.c18
-rw-r--r--net/ipv4/ipmr.c12
-rw-r--r--net/ipv4/netfilter.c6
-rw-r--r--net/ipv4/raw.c10
-rw-r--r--net/ipv4/route.c72
-rw-r--r--net/ipv4/syncookies.c20
-rw-r--r--net/ipv4/udp.c21
-rw-r--r--net/ipv4/xfrm4_policy.c10
-rw-r--r--net/ipv4/xfrm4_state.c4
14 files changed, 116 insertions, 107 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index fe10bcd..7610528 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -200,9 +200,9 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
int ret;
struct net *net;
- fl.oif = 0;
- fl.iif = oif;
- fl.mark = mark;
+ fl.flowi_oif = 0;
+ fl.flowi_iif = oif;
+ fl.flowi_mark = mark;
fl.fl4_dst = src;
fl.fl4_src = dst;
fl.fl4_tos = tos;
@@ -215,7 +215,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
rpf = IN_DEV_RPFILTER(in_dev);
accept_local = IN_DEV_ACCEPT_LOCAL(in_dev);
if (mark && !IN_DEV_SRC_VMARK(in_dev))
- fl.mark = 0;
+ fl.flowi_mark = 0;
}
if (in_dev == NULL)
@@ -253,7 +253,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
goto last_resort;
if (rpf == 1)
goto e_rpf;
- fl.oif = dev->ifindex;
+ fl.flowi_oif = dev->ifindex;
ret = 0;
if (fib_lookup(net, &fl, &res) == 0) {
@@ -797,7 +797,7 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb)
struct fib_result res;
struct flowi fl = {
- .mark = frn->fl_mark,
+ .flowi_mark = frn->fl_mark,
.fl4_dst = frn->fl_addr,
.fl4_tos = frn->fl_tos,
.fl4_scope = frn->fl_scope,
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index b5d523b..79179ad 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -563,7 +563,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,
struct flowi fl = {
.fl4_dst = nh->nh_gw,
.fl4_scope = cfg->fc_scope + 1,
- .oif = nh->nh_oif,
+ .flowi_oif = nh->nh_oif,
};
/* It is not necessary, but requires a bit of thinking */
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index a4109a5..d5ff80e 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1379,7 +1379,7 @@ static int check_leaf(struct fib_table *tb, struct trie *t, struct leaf *l,
if (nh->nh_flags & RTNH_F_DEAD)
continue;
- if (flp->oif && flp->oif != nh->nh_oif)
+ if (flp->flowi_oif && flp->flowi_oif != nh->nh_oif)
continue;
#ifdef CONFIG_IP_FIB_TRIE_STATS
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 1771ce6..3fde7f2 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -353,10 +353,12 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
daddr = icmp_param->replyopts.faddr;
}
{
- struct flowi fl = { .fl4_dst= daddr,
- .fl4_src = rt->rt_spec_dst,
- .fl4_tos = RT_TOS(ip_hdr(skb)->tos),
- .proto = IPPROTO_ICMP };
+ struct flowi fl = {
+ .fl4_dst = daddr,
+ .fl4_src = rt->rt_spec_dst,
+ .fl4_tos = RT_TOS(ip_hdr(skb)->tos),
+ .flowi_proto = IPPROTO_ICMP,
+ };
security_skb_classify_flow(skb, &fl);
rt = ip_route_output_key(net, &fl);
if (IS_ERR(rt))
@@ -381,7 +383,7 @@ static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in,
param->replyopts.faddr : iph->saddr),
.fl4_src = saddr,
.fl4_tos = RT_TOS(tos),
- .proto = IPPROTO_ICMP,
+ .flowi_proto = IPPROTO_ICMP,
.fl_icmp_type = type,
.fl_icmp_code = code,
};
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index e4e301a..9708170 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -356,16 +356,18 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
struct rtable *rt;
const struct inet_request_sock *ireq = inet_rsk(req);
struct ip_options *opt = inet_rsk(req)->opt;
- struct flowi fl = { .oif = sk->sk_bound_dev_if,
- .mark = sk->sk_mark,
- .fl4_dst = ((opt && opt->srr) ?
- opt->faddr : ireq->rmt_addr),
- .fl4_src = ireq->loc_addr,
- .fl4_tos = RT_CONN_FLAGS(sk),
- .proto = sk->sk_protocol,
- .flags = inet_sk_flowi_flags(sk),
- .fl_ip_sport = inet_sk(sk)->inet_sport,
- .fl_ip_dport = ireq->rmt_port };
+ struct flowi fl = {
+ .flowi_oif = sk->sk_bound_dev_if,
+ .flowi_mark = sk->sk_mark,
+ .fl4_dst = ((opt && opt->srr) ?
+ opt->faddr : ireq->rmt_addr),
+ .fl4_src = ireq->loc_addr,
+ .fl4_tos = RT_CONN_FLAGS(sk),
+ .flowi_proto = sk->sk_protocol,
+ .flowi_flags = inet_sk_flowi_flags(sk),
+ .fl_ip_sport = inet_sk(sk)->inet_sport,
+ .fl_ip_dport = ireq->rmt_port,
+ };
struct net *net = sock_net(sk);
security_req_classify_flow(req, &fl);
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 916152d..e35ca40 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1474,14 +1474,16 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
}
{
- struct flowi fl = { .oif = arg->bound_dev_if,
- .fl4_dst = daddr,
- .fl4_src = rt->rt_spec_dst,
- .fl4_tos = RT_TOS(ip_hdr(skb)->tos),
- .fl_ip_sport = tcp_hdr(skb)->dest,
- .fl_ip_dport = tcp_hdr(skb)->source,
- .proto = sk->sk_protocol,
- .flags = ip_reply_arg_flowi_flags(arg) };
+ struct flowi fl = {
+ .flowi_oif = arg->bound_dev_if,
+ .fl4_dst = daddr,
+ .fl4_src = rt->rt_spec_dst,
+ .fl4_tos = RT_TOS(ip_hdr(skb)->tos),
+ .fl_ip_sport = tcp_hdr(skb)->dest,
+ .fl_ip_dport = tcp_hdr(skb)->source,
+ .flowi_proto = sk->sk_protocol,
+ .flowi_flags = ip_reply_arg_flowi_flags(arg),
+ };
security_skb_classify_flow(skb, &fl);
rt = ip_route_output_key(sock_net(sk), &fl);
if (IS_ERR(rt))
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 594a300..3b72b0a 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -436,9 +436,9 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
struct net *net = dev_net(dev);
struct mr_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;
@@ -1793,9 +1793,9 @@ static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct rtable *rt)
.fl4_dst = rt->rt_key_dst,
.fl4_src = rt->rt_key_src,
.fl4_tos = rt->rt_tos,
- .oif = rt->rt_oif,
- .iif = rt->rt_iif,
- .mark = rt->rt_mark,
+ .flowi_oif = rt->rt_oif,
+ .flowi_iif = rt->rt_iif,
+ .flowi_mark = rt->rt_mark,
};
struct mr_table *mrt;
int err;
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 67bf709..6f40ba5 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -35,9 +35,9 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type)
if (type == RTN_LOCAL)
fl.fl4_src = iph->saddr;
fl.fl4_tos = RT_TOS(iph->tos);
- fl.oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
- fl.mark = skb->mark;
- fl.flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0;
+ fl.flowi_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
+ fl.flowi_mark = skb->mark;
+ fl.flowi_flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0;
rt = ip_route_output_key(net, &fl);
if (IS_ERR(rt))
return -1;
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 467d570..b42b7cd 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -418,7 +418,7 @@ static int raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg)
if (!iov)
continue;
- switch (fl->proto) {
+ switch (fl->flowi_proto) {
case IPPROTO_ICMP:
/* check if one-byte field is readable or not. */
if (iov->iov_base && iov->iov_len < 1)
@@ -548,14 +548,14 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
{
- struct flowi fl = { .oif = ipc.oif,
- .mark = sk->sk_mark,
+ struct flowi fl = { .flowi_oif = ipc.oif,
+ .flowi_mark = sk->sk_mark,
.fl4_dst = daddr,
.fl4_src = saddr,
.fl4_tos = tos,
- .proto = inet->hdrincl ? IPPROTO_RAW :
+ .flowi_proto = inet->hdrincl ? IPPROTO_RAW :
sk->sk_protocol,
- .flags = FLOWI_FLAG_CAN_SLEEP,
+ .flowi_flags = FLOWI_FLAG_CAN_SLEEP,
};
if (!inet->hdrincl) {
err = raw_probe_proto_opt(&fl, msg);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9c17e32..c9aa4f9 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1701,9 +1701,9 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt)
.fl4_dst = rt->rt_key_dst,
.fl4_src = rt->rt_key_src,
.fl4_tos = rt->rt_tos,
- .oif = rt->rt_oif,
- .iif = rt->rt_iif,
- .mark = rt->rt_mark,
+ .flowi_oif = rt->rt_oif,
+ .flowi_iif = rt->rt_iif,
+ .flowi_mark = rt->rt_mark,
};
rcu_read_lock();
@@ -1766,7 +1766,7 @@ static void rt_init_metrics(struct rtable *rt, const struct flowi *oldflp,
/* If a peer entry exists for this destination, we must hook
* it up in order to get at cached metrics.
*/
- if (oldflp && (oldflp->flags & FLOWI_FLAG_PRECOW_METRICS))
+ if (oldflp && (oldflp->flowi_flags & FLOWI_FLAG_PRECOW_METRICS))
create = 1;
rt->peer = peer = inet_getpeer_v4(rt->rt_dst, create);
@@ -2057,9 +2057,9 @@ static int ip_mkroute_input(struct sk_buff *skb,
return err;
/* put it into the cache */
- hash = rt_hash(daddr, saddr, fl->iif,
+ hash = rt_hash(daddr, saddr, fl->flowi_iif,
rt_genid(dev_net(rth->dst.dev)));
- rth = rt_intern_hash(hash, rth, skb, fl->iif);
+ rth = rt_intern_hash(hash, rth, skb, fl->flowi_iif);
if (IS_ERR(rth))
return PTR_ERR(rth);
return 0;
@@ -2118,9 +2118,9 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
/*
* Now we are ready to route packet.
*/
- fl.oif = 0;
- fl.iif = dev->ifindex;
- fl.mark = skb->mark;
+ fl.flowi_oif = 0;
+ fl.flowi_iif = dev->ifindex;
+ fl.flowi_mark = skb->mark;
fl.fl4_dst = daddr;
fl.fl4_src = saddr;
fl.fl4_tos = tos;
@@ -2205,8 +2205,8 @@ local_input:
rth->rt_flags &= ~RTCF_LOCAL;
}
rth->rt_type = res.type;
- hash = rt_hash(daddr, saddr, fl.iif, rt_genid(net));
- rth = rt_intern_hash(hash, rth, skb, fl.iif);
+ hash = rt_hash(daddr, saddr, fl.flowi_iif, rt_genid(net));
+ rth = rt_intern_hash(hash, rth, skb, fl.flowi_iif);
err = 0;
if (IS_ERR(rth))
err = PTR_ERR(rth);
@@ -2369,7 +2369,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
} else if (type == RTN_MULTICAST) {
flags |= RTCF_MULTICAST | RTCF_LOCAL;
if (!ip_check_mc_rcu(in_dev, oldflp->fl4_dst, oldflp->fl4_src,
- oldflp->proto))
+ oldflp->flowi_proto))
flags &= ~RTCF_LOCAL;
/* If multicast route do not exist use
* default one, but do not gateway in this case.
@@ -2387,8 +2387,8 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
rth->rt_key_dst = oldflp->fl4_dst;
rth->rt_tos = tos;
rth->rt_key_src = oldflp->fl4_src;
- rth->rt_oif = oldflp->oif;
- rth->rt_mark = oldflp->mark;
+ rth->rt_oif = oldflp->flowi_oif;
+ rth->rt_mark = oldflp->flowi_mark;
rth->rt_dst = fl->fl4_dst;
rth->rt_src = fl->fl4_src;
rth->rt_iif = 0;
@@ -2452,9 +2452,9 @@ static struct rtable *ip_route_output_slow(struct net *net,
res.r = NULL;
#endif
- fl.oif = oldflp->oif;
- fl.iif = net->loopback_dev->ifindex;
- fl.mark = oldflp->mark;
+ fl.flowi_oif = oldflp->flowi_oif;
+ fl.flowi_iif = net->loopback_dev->ifindex;
+ fl.flowi_mark = oldflp->flowi_mark;
fl.fl4_dst = oldflp->fl4_dst;
fl.fl4_src = oldflp->fl4_src;
fl.fl4_tos = tos & IPTOS_RT_MASK;
@@ -2477,7 +2477,7 @@ static struct rtable *ip_route_output_slow(struct net *net,
of another iface. --ANK
*/
- if (oldflp->oif == 0 &&
+ if (oldflp->flowi_oif == 0 &&
(ipv4_is_multicast(oldflp->fl4_dst) ||
ipv4_is_lbcast(oldflp->fl4_dst))) {
/* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */
@@ -2500,11 +2500,11 @@ static struct rtable *ip_route_output_slow(struct net *net,
Luckily, this hack is good workaround.
*/
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
goto make_route;
}
- if (!(oldflp->flags & FLOWI_FLAG_ANYSRC)) {
+ if (!(oldflp->flowi_flags & FLOWI_FLAG_ANYSRC)) {
/* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */
if (!__ip_dev_find(net, oldflp->fl4_src, false))
goto out;
@@ -2512,8 +2512,8 @@ static struct rtable *ip_route_output_slow(struct net *net,
}
- if (oldflp->oif) {
- dev_out = dev_get_by_index_rcu(net, oldflp->oif);
+ if (oldflp->flowi_oif) {
+ dev_out = dev_get_by_index_rcu(net, oldflp->flowi_oif);
rth = ERR_PTR(-ENODEV);
if (dev_out == NULL)
goto out;
@@ -2545,7 +2545,7 @@ static struct rtable *ip_route_output_slow(struct net *net,
if (!fl.fl4_dst)
fl.fl4_dst = fl.fl4_src = htonl(INADDR_LOOPBACK);
dev_out = net->loopback_dev;
- fl.oif = net->loopback_dev->ifindex;
+ fl.flowi_oif = net->loopback_dev->ifindex;
res.type = RTN_LOCAL;
flags |= RTCF_LOCAL;
goto make_route;
@@ -2553,7 +2553,7 @@ static struct rtable *ip_route_output_slow(struct net *net,
if (fib_lookup(net, &fl, &res)) {
res.fi = NULL;
- if (oldflp->oif) {
+ if (oldflp->flowi_oif) {
/* Apparently, routing tables are wrong. Assume,
that the destination is on link.
@@ -2590,25 +2590,25 @@ static struct rtable *ip_route_output_slow(struct net *net,
fl.fl4_src = fl.fl4_dst;
}
dev_out = net->loopback_dev;
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
res.fi = NULL;
flags |= RTCF_LOCAL;
goto make_route;
}
#ifdef CONFIG_IP_ROUTE_MULTIPATH
- if (res.fi->fib_nhs > 1 && fl.oif == 0)
+ if (res.fi->fib_nhs > 1 && fl.flowi_oif == 0)
fib_select_multipath(&res);
else
#endif
- if (!res.prefixlen && res.type == RTN_UNICAST && !fl.oif)
+ if (!res.prefixlen && res.type == RTN_UNICAST && !fl.flowi_oif)
fib_select_default(&res);
if (!fl.fl4_src)
fl.fl4_src = FIB_RES_PREFSRC(res);
dev_out = FIB_RES_DEV(res);
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
make_route:
@@ -2616,9 +2616,9 @@ make_route:
if (!IS_ERR(rth)) {
unsigned int hash;
- hash = rt_hash(oldflp->fl4_dst, oldflp->fl4_src, oldflp->oif,
+ hash = rt_hash(oldflp->fl4_dst, oldflp->fl4_src, oldflp->flowi_oif,
rt_genid(dev_net(dev_out)));
- rth = rt_intern_hash(hash, rth, NULL, oldflp->oif);
+ rth = rt_intern_hash(hash, rth, NULL, oldflp->flowi_oif);
}
out:
@@ -2634,7 +2634,7 @@ struct rtable *__ip_route_output_key(struct net *net, const struct flowi *flp)
if (!rt_caching(net))
goto slow_output;
- hash = rt_hash(flp->fl4_dst, flp->fl4_src, flp->oif, rt_genid(net));
+ hash = rt_hash(flp->fl4_dst, flp->fl4_src, flp->flowi_oif, rt_genid(net));
rcu_read_lock_bh();
for (rth = rcu_dereference_bh(rt_hash_table[hash].chain); rth;
@@ -2642,8 +2642,8 @@ struct rtable *__ip_route_output_key(struct net *net, const struct flowi *flp)
if (rth->rt_key_dst == flp->fl4_dst &&
rth->rt_key_src == flp->fl4_src &&
rt_is_output_route(rth) &&
- rth->rt_oif == flp->oif &&
- rth->rt_mark == flp->mark &&
+ rth->rt_oif == flp->flowi_oif &&
+ rth->rt_mark == flp->flowi_mark &&
!((rth->rt_tos ^ flp->fl4_tos) &
(IPTOS_RT_MASK | RTO_ONLINK)) &&
net_eq(dev_net(rth->dst.dev), net) &&
@@ -2741,7 +2741,7 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi *flp,
if (IS_ERR(rt))
return rt;
- if (flp->proto) {
+ if (flp->flowi_proto) {
if (!flp->fl4_src)
flp->fl4_src = rt->rt_src;
if (!flp->fl4_dst)
@@ -2917,8 +2917,8 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void
.fl4_dst = dst,
.fl4_src = src,
.fl4_tos = rtm->rtm_tos,
- .oif = tb[RTA_OIF] ? nla_get_u32(tb[RTA_OIF]) : 0,
- .mark = mark,
+ .flowi_oif = tb[RTA_OIF] ? nla_get_u32(tb[RTA_OIF]) : 0,
+ .flowi_mark = mark,
};
rt = ip_route_output_key(net, &fl);
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 0ad6ddf..98d47dc 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -345,15 +345,17 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
* no easy way to do this.
*/
{
- struct flowi fl = { .mark = sk->sk_mark,
- .fl4_dst = ((opt && opt->srr) ?
- opt->faddr : ireq->rmt_addr),
- .fl4_src = ireq->loc_addr,
- .fl4_tos = RT_CONN_FLAGS(sk),
- .proto = IPPROTO_TCP,
- .flags = inet_sk_flowi_flags(sk),
- .fl_ip_sport = th->dest,
- .fl_ip_dport = th->source };
+ struct flowi fl = {
+ .flowi_mark = sk->sk_mark,
+ .fl4_dst = ((opt && opt->srr) ?
+ opt->faddr : ireq->rmt_addr),
+ .fl4_src = ireq->loc_addr,
+ .fl4_tos = RT_CONN_FLAGS(sk),
+ .flowi_proto = IPPROTO_TCP,
+ .flowi_flags = inet_sk_flowi_flags(sk),
+ .fl_ip_sport = th->dest,
+ .fl_ip_dport = th->source,
+ };
security_req_classify_flow(req, &fl);
rt = ip_route_output_key(sock_net(sk), &fl);
if (IS_ERR(rt)) {
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index c9a73e5..e10f62e 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -908,16 +908,17 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
rt = (struct rtable *)sk_dst_check(sk, 0);
if (rt == NULL) {
- struct flowi fl = { .oif = ipc.oif,
- .mark = sk->sk_mark,
- .fl4_dst = faddr,
- .fl4_src = saddr,
- .fl4_tos = tos,
- .proto = sk->sk_protocol,
- .flags = (inet_sk_flowi_flags(sk) |
- FLOWI_FLAG_CAN_SLEEP),
- .fl_ip_sport = inet->inet_sport,
- .fl_ip_dport = dport
+ struct flowi fl = {
+ .flowi_oif = ipc.oif,
+ .flowi_mark = sk->sk_mark,
+ .fl4_dst = faddr,
+ .fl4_src = saddr,
+ .fl4_tos = tos,
+ .flowi_proto = sk->sk_protocol,
+ .flowi_flags = (inet_sk_flowi_flags(sk) |
+ FLOWI_FLAG_CAN_SLEEP),
+ .fl_ip_sport = inet->inet_sport,
+ .fl_ip_dport = dport,
};
struct net *net = sock_net(sk);
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index c70c42e..4294f12 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -73,9 +73,9 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
rt->rt_key_dst = fl->fl4_dst;
rt->rt_key_src = fl->fl4_src;
rt->rt_tos = fl->fl4_tos;
- rt->rt_iif = fl->iif;
- rt->rt_oif = fl->oif;
- rt->rt_mark = fl->mark;
+ rt->rt_iif = fl->flowi_iif;
+ rt->rt_oif = fl->flowi_oif;
+ rt->rt_mark = fl->flowi_mark;
xdst->u.dst.dev = dev;
dev_hold(dev);
@@ -104,7 +104,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
memset(fl, 0, sizeof(struct flowi));
- fl->mark = skb->mark;
+ fl->flowi_mark = skb->mark;
if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) {
switch (iph->protocol) {
@@ -173,7 +173,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
break;
}
}
- fl->proto = iph->protocol;
+ fl->flowi_proto = iph->protocol;
fl->fl4_dst = reverse ? iph->saddr : iph->daddr;
fl->fl4_src = reverse ? iph->daddr : iph->saddr;
fl->fl4_tos = iph->tos;
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
index 983eff2..d231434 100644
--- a/net/ipv4/xfrm4_state.c
+++ b/net/ipv4/xfrm4_state.c
@@ -32,8 +32,8 @@ __xfrm4_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl)
sel->family = AF_INET;
sel->prefixlen_d = 32;
sel->prefixlen_s = 32;
- sel->proto = fl->proto;
- sel->ifindex = fl->oif;
+ sel->proto = fl->flowi_proto;
+ sel->ifindex = fl->flowi_oif;
}
static void