aboutsummaryrefslogtreecommitdiff
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
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>
-rw-r--r--drivers/infiniband/core/addr.c2
-rw-r--r--drivers/net/cnic.c2
-rw-r--r--include/net/dn_route.h4
-rw-r--r--include/net/flow.h22
-rw-r--r--include/net/route.h36
-rw-r--r--include/net/xfrm.h4
-rw-r--r--net/core/fib_rules.c6
-rw-r--r--net/dccp/ipv4.c17
-rw-r--r--net/dccp/ipv6.c20
-rw-r--r--net/decnet/af_decnet.c4
-rw-r--r--net/decnet/dn_fib.c4
-rw-r--r--net/decnet/dn_nsp_out.c4
-rw-r--r--net/decnet/dn_route.c96
-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
-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
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c2
-rw-r--r--net/netfilter/xt_TEE.c4
-rw-r--r--net/sctp/ipv6.c8
-rw-r--r--net/sctp/protocol.c4
-rw-r--r--net/xfrm/xfrm_policy.c18
-rw-r--r--net/xfrm/xfrm_state.c2
-rw-r--r--security/security.c4
-rw-r--r--security/selinux/hooks.c2
-rw-r--r--security/selinux/xfrm.c4
56 files changed, 365 insertions, 351 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 1742f72fbd5..3c2b309ab89 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -239,7 +239,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
memset(&fl, 0, sizeof fl);
ipv6_addr_copy(&fl.fl6_dst, &dst_in->sin6_addr);
ipv6_addr_copy(&fl.fl6_src, &src_in->sin6_addr);
- fl.oif = addr->bound_dev_if;
+ fl.flowi_oif = addr->bound_dev_if;
dst = ip6_route_output(&init_net, NULL, &fl);
if ((ret = dst->error))
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 65832951fe0..c8922f69705 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -3429,7 +3429,7 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
memset(&fl, 0, sizeof(fl));
ipv6_addr_copy(&fl.fl6_dst, &dst_addr->sin6_addr);
if (ipv6_addr_type(&fl.fl6_dst) & IPV6_ADDR_LINKLOCAL)
- fl.oif = dst_addr->sin6_scope_id;
+ fl.flowi_oif = dst_addr->sin6_scope_id;
*dst = ip6_route_output(&init_net, NULL, &fl);
if (*dst)
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 9b185df265f..1f59005e497 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -82,12 +82,12 @@ struct dn_route {
static inline bool dn_is_input_route(struct dn_route *rt)
{
- return rt->fl.iif != 0;
+ return rt->fl.flowi_iif != 0;
}
static inline bool dn_is_output_route(struct dn_route *rt)
{
- return rt->fl.iif == 0;
+ return rt->fl.flowi_iif == 0;
}
extern void dn_route_init(void);
diff --git a/include/net/flow.h b/include/net/flow.h
index a661fd6f76b..8c4dbd07849 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -11,17 +11,17 @@
#include <asm/atomic.h>
struct flowi {
- int oif;
- int iif;
- __u32 mark;
- __u8 tos;
- __u8 scope;
- __u8 proto;
- __u8 flags;
+ int flowi_oif;
+ int flowi_iif;
+ __u32 flowi_mark;
+ __u8 flowi_tos;
+ __u8 flowi_scope;
+ __u8 flowi_proto;
+ __u8 flowi_flags;
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_PRECOW_METRICS 0x02
#define FLOWI_FLAG_CAN_SLEEP 0x04
- __u32 secid;
+ __u32 flowi_secid;
union {
struct {
@@ -49,8 +49,8 @@ struct flowi {
#define fl6_flowlabel nl_u.ip6_u.flowlabel
#define fl4_dst nl_u.ip4_u.daddr
#define fl4_src nl_u.ip4_u.saddr
-#define fl4_tos tos
-#define fl4_scope scope
+#define fl4_tos flowi_tos
+#define fl4_scope flowi_scope
union {
struct {
@@ -116,7 +116,7 @@ extern atomic_t flow_cache_genid;
static inline int flow_cache_uli_match(const struct flowi *fl1,
const struct flowi *fl2)
{
- return (fl1->proto == fl2->proto &&
+ return (fl1->flowi_proto == fl2->flowi_proto &&
!memcmp(&fl1->uli_u, &fl2->uli_u, sizeof(fl1->uli_u)));
}
diff --git a/include/net/route.h b/include/net/route.h
index f140f4130fe..3d814f84abd 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -136,7 +136,7 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr,
__be32 saddr, u8 tos, int oif)
{
struct flowi fl = {
- .oif = oif,
+ .flowi_oif = oif,
.fl4_dst = daddr,
.fl4_src = saddr,
.fl4_tos = tos,
@@ -150,13 +150,13 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct sock
__u8 proto, __u8 tos, int oif)
{
struct flowi fl = {
- .oif = oif,
- .flags = sk ? inet_sk_flowi_flags(sk) : 0,
- .mark = sk ? sk->sk_mark : 0,
+ .flowi_oif = oif,
+ .flowi_flags = sk ? inet_sk_flowi_flags(sk) : 0,
+ .flowi_mark = sk ? sk->sk_mark : 0,
.fl4_dst = daddr,
.fl4_src = saddr,
.fl4_tos = tos,
- .proto = proto,
+ .flowi_proto = proto,
.fl_ip_dport = dport,
.fl_ip_sport = sport,
};
@@ -170,11 +170,11 @@ static inline struct rtable *ip_route_output_gre(struct net *net,
__be32 gre_key, __u8 tos, int oif)
{
struct flowi fl = {
- .oif = oif,
+ .flowi_oif = oif,
.fl4_dst = daddr,
.fl4_src = saddr,
.fl4_tos = tos,
- .proto = IPPROTO_GRE,
+ .flowi_proto = IPPROTO_GRE,
.fl_gre_key = gre_key,
};
return ip_route_output_key(net, &fl);
@@ -228,23 +228,23 @@ static inline struct rtable *ip_route_connect(__be32 dst, __be32 src, u32 tos,
__be16 sport, __be16 dport,
struct sock *sk, bool can_sleep)
{
- struct flowi fl = { .oif = oif,
- .mark = sk->sk_mark,
+ struct flowi fl = { .flowi_oif = oif,
+ .flowi_mark = sk->sk_mark,
.fl4_dst = dst,
.fl4_src = src,
.fl4_tos = tos,
- .proto = protocol,
+ .flowi_proto = protocol,
.fl_ip_sport = sport,
.fl_ip_dport = dport };
struct net *net = sock_net(sk);
struct rtable *rt;
if (inet_sk(sk)->transparent)
- fl.flags |= FLOWI_FLAG_ANYSRC;
+ fl.flowi_flags |= FLOWI_FLAG_ANYSRC;
if (protocol == IPPROTO_TCP)
- fl.flags |= FLOWI_FLAG_PRECOW_METRICS;
+ fl.flowi_flags |= FLOWI_FLAG_PRECOW_METRICS;
if (can_sleep)
- fl.flags |= FLOWI_FLAG_CAN_SLEEP;
+ fl.flowi_flags |= FLOWI_FLAG_CAN_SLEEP;
if (!dst || !src) {
rt = __ip_route_output_key(net, &fl);
@@ -264,19 +264,19 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
__be16 dport, struct sock *sk)
{
if (sport != orig_sport || dport != orig_dport) {
- struct flowi fl = { .oif = rt->rt_oif,
- .mark = rt->rt_mark,
+ struct flowi fl = { .flowi_oif = rt->rt_oif,
+ .flowi_mark = rt->rt_mark,
.fl4_dst = rt->rt_key_dst,
.fl4_src = rt->rt_key_src,
.fl4_tos = rt->rt_tos,
- .proto = protocol,
+ .flowi_proto = protocol,
.fl_ip_sport = sport,
.fl_ip_dport = dport };
if (inet_sk(sk)->transparent)
- fl.flags |= FLOWI_FLAG_ANYSRC;
+ fl.flowi_flags |= FLOWI_FLAG_ANYSRC;
if (protocol == IPPROTO_TCP)
- fl.flags |= FLOWI_FLAG_PRECOW_METRICS;
+ fl.flowi_flags |= FLOWI_FLAG_PRECOW_METRICS;
ip_rt_put(rt);
security_sk_classify_flow(sk, &fl);
return ip_route_output_flow(sock_net(sk), &fl, sk);
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d5dcf397463..d5a12d10a0d 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -803,7 +803,7 @@ static __inline__
__be16 xfrm_flowi_sport(const struct flowi *fl)
{
__be16 port;
- switch(fl->proto) {
+ switch(fl->flowi_proto) {
case IPPROTO_TCP:
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
@@ -830,7 +830,7 @@ static __inline__
__be16 xfrm_flowi_dport(const struct flowi *fl)
{
__be16 port;
- switch(fl->proto) {
+ switch(fl->flowi_proto) {
case IPPROTO_TCP:
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index a20e5d3bbfa..8248ebb5891 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -181,13 +181,13 @@ static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
{
int ret = 0;
- if (rule->iifindex && (rule->iifindex != fl->iif))
+ if (rule->iifindex && (rule->iifindex != fl->flowi_iif))
goto out;
- if (rule->oifindex && (rule->oifindex != fl->oif))
+ if (rule->oifindex && (rule->oifindex != fl->flowi_oif))
goto out;
- if ((rule->mark ^ fl->mark) & rule->mark_mask)
+ if ((rule->mark ^ fl->flowi_mark) & rule->mark_mask)
goto out;
ret = ops->match(rule, fl, flags);
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 7882377bc62..09a09911c5e 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,
struct sk_buff *skb)
{
struct rtable *rt;
- struct flowi fl = { .oif = skb_rtable(skb)->rt_iif,
- .fl4_dst = ip_hdr(skb)->saddr,
- .fl4_src = ip_hdr(skb)->daddr,
- .fl4_tos = RT_CONN_FLAGS(sk),
- .proto = sk->sk_protocol,
- .fl_ip_sport = dccp_hdr(skb)->dccph_dport,
- .fl_ip_dport = dccp_hdr(skb)->dccph_sport
- };
+ struct flowi fl = {
+ .flowi_oif = skb_rtable(skb)->rt_iif,
+ .fl4_dst = ip_hdr(skb)->saddr,
+ .fl4_src = ip_hdr(skb)->daddr,
+ .fl4_tos = RT_CONN_FLAGS(sk),
+ .flowi_proto = sk->sk_protocol,
+ .fl_ip_sport = dccp_hdr(skb)->dccph_dport,
+ .fl_ip_dport = dccp_hdr(skb)->dccph_sport,
+ };
security_skb_classify_flow(skb, &fl);
rt = ip_route_output_flow(net, &fl, sk);
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 5efc57f5e60..5209ee7a3dc 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,
for now.
*/
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_DCCP;
+ fl.flowi_proto = IPPROTO_DCCP;
ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
ipv6_addr_copy(&fl.fl6_src, &np->saddr);
- fl.oif = sk->sk_bound_dev_if;
+ fl.flowi_oif = sk->sk_bound_dev_if;
fl.fl_ip_dport = inet->inet_dport;
fl.fl_ip_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
@@ -248,11 +248,11 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req,
struct dst_entry *dst;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_DCCP;
+ fl.flowi_proto = IPPROTO_DCCP;
ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr);
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
fl.fl6_flowlabel = 0;
- fl.oif = ireq6->iif;
+ fl.flowi_oif = ireq6->iif;
fl.fl_ip_dport = inet_rsk(req)->rmt_port;
fl.fl_ip_sport = inet_rsk(req)->loc_port;
security_req_classify_flow(req, &fl);
@@ -321,8 +321,8 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
ipv6_addr_copy(&fl.fl6_dst, &rxip6h->saddr);
ipv6_addr_copy(&fl.fl6_src, &rxip6h->daddr);
- fl.proto = IPPROTO_DCCP;
- fl.oif = inet6_iif(rxskb);
+ fl.flowi_proto = IPPROTO_DCCP;
+ fl.flowi_oif = inet6_iif(rxskb);
fl.fl_ip_dport = dccp_hdr(skb)->dccph_dport;
fl.fl_ip_sport = dccp_hdr(skb)->dccph_sport;
security_skb_classify_flow(rxskb, &fl);
@@ -530,11 +530,11 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
struct flowi fl;
memset(&fl, 0, sizeof(fl));
- fl.proto = IPPROTO_DCCP;
+ fl.flowi_proto = IPPROTO_DCCP;
ipv6_addr_copy(&fl.fl6_dst, &ireq6->rmt_addr);
final_p = fl6_update_dst(&fl, opt, &final);
ipv6_addr_copy(&fl.fl6_src, &ireq6->loc_addr);
- fl.oif = sk->sk_bound_dev_if;
+ fl.flowi_oif = sk->sk_bound_dev_if;
fl.fl_ip_dport = inet_rsk(req)->rmt_port;
fl.fl_ip_sport = inet_rsk(req)->loc_port;
security_sk_classify_flow(sk, &fl);
@@ -953,10 +953,10 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
if (!ipv6_addr_any(&np->rcv_saddr))
saddr = &np->rcv_saddr;
- fl.proto = IPPROTO_DCCP;
+ fl.flowi_proto = IPPROTO_DCCP;
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.flowi_oif = sk->sk_bound_dev_if;
fl.fl_ip_dport = usin->sin6_port;
fl.fl_ip_sport = inet->inet_sport;
security_sk_classify_flow(sk, &fl);
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 2af15b15d1f..aafd15a0157 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -948,11 +948,11 @@ static int __dn_connect(struct sock *sk, struct sockaddr_dn *addr, int addrlen,
err = -EHOSTUNREACH;
memset(&fl, 0, sizeof(fl));
- fl.oif = sk->sk_bound_dev_if;
+ fl.flowi_oif = sk->sk_bound_dev_if;
fl.fld_dst = dn_saddr2dn(&scp->peer);
fl.fld_src = dn_saddr2dn(&scp->addr);
dn_sk_ports_copy(&fl, scp);
- fl.proto = DNPROTO_NSP;
+ fl.flowi_proto = DNPROTO_NSP;
if (dn_route_output_sock(&sk->sk_dst_cache, &fl, sk, flags) < 0)
goto out;
sk->sk_route_caps = sk->sk_dst_cache->dev->features;
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 0ef0a81bcd7..4dfffa0b67a 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -223,7 +223,7 @@ static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct
memset(&fl, 0, sizeof(fl));
fl.fld_dst = nh->nh_gw;
- fl.oif = nh->nh_oif;
+ fl.flowi_oif = nh->nh_oif;
fl.fld_scope = r->rtm_scope + 1;
if (fl.fld_scope < RT_SCOPE_LINK)
@@ -424,7 +424,7 @@ int dn_fib_semantic_match(int type, struct dn_fib_info *fi, const struct flowi *
for_nexthops(fi) {
if (nh->nh_flags & RTNH_F_DEAD)
continue;
- if (!fl->oif || fl->oif == nh->nh_oif)
+ if (!fl->flowi_oif || fl->flowi_oif == nh->nh_oif)
break;
}
if (nhsel < fi->fib_nhs) {
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index 2ef115277be..b3d66742a01 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -92,11 +92,11 @@ try_again:
}
memset(&fl, 0, sizeof(fl));
- fl.oif = sk->sk_bound_dev_if;
+ fl.flowi_oif = sk->sk_bound_dev_if;
fl.fld_src = dn_saddr2dn(&scp->addr);
fl.fld_dst = dn_saddr2dn(&scp->peer);
dn_sk_ports_copy(&fl, scp);
- fl.proto = DNPROTO_NSP;
+ fl.flowi_proto = DNPROTO_NSP;
if (dn_route_output_sock(&sk->sk_dst_cache, &fl, sk, 0) == 0) {
dst = sk_dst_get(sk);
sk->sk_route_caps = dst->dev->features;
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 484fdbf92bd..d74d34b93f8 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -286,10 +286,10 @@ static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
{
return ((fl1->fld_dst ^ fl2->fld_dst) |
(fl1->fld_src ^ fl2->fld_src) |
- (fl1->mark ^ fl2->mark) |
+ (fl1->flowi_mark ^ fl2->flowi_mark) |
(fl1->fld_scope ^ fl2->fld_scope) |
- (fl1->oif ^ fl2->oif) |
- (fl1->iif ^ fl2->iif)) == 0;
+ (fl1->flowi_oif ^ fl2->flowi_oif) |
+ (fl1->flowi_iif ^ fl2->flowi_iif)) == 0;
}
static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route **rp)
@@ -905,12 +905,14 @@ static inline __le16 dn_fib_rules_map_destination(__le16 daddr, struct dn_fib_re
static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *oldflp, int try_hard)
{
- struct flowi fl = { .fld_dst = oldflp->fld_dst,
- .fld_src = oldflp->fld_src,
- .fld_scope = RT_SCOPE_UNIVERSE,
- .mark = oldflp->mark,
- .iif = init_net.loopback_dev->ifindex,
- .oif = oldflp->oif };
+ struct flowi fl = {
+ .fld_dst = oldflp->fld_dst,
+ .fld_src = oldflp->fld_src,
+ .fld_scope = RT_SCOPE_UNIVERSE,
+ .flowi_mark = oldflp->flowi_mark,
+ .flowi_iif = init_net.loopback_dev->ifindex,
+ .flowi_oif = oldflp->flowi_oif,
+ };
struct dn_route *rt = NULL;
struct net_device *dev_out = NULL, *dev;
struct neighbour *neigh = NULL;
@@ -926,11 +928,11 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old
"dn_route_output_slow: dst=%04x src=%04x mark=%d"
" iif=%d oif=%d\n", le16_to_cpu(oldflp->fld_dst),
le16_to_cpu(oldflp->fld_src),
- oldflp->mark, init_net.loopback_dev->ifindex, oldflp->oif);
+ oldflp->flowi_mark, init_net.loopback_dev->ifindex, oldflp->flowi_oif);
/* If we have an output interface, verify its a DECnet device */
- if (oldflp->oif) {
- dev_out = dev_get_by_index(&init_net, oldflp->oif);
+ if (oldflp->flowi_oif) {
+ dev_out = dev_get_by_index(&init_net, oldflp->flowi_oif);
err = -ENODEV;
if (dev_out && dev_out->dn_ptr == NULL) {
dev_put(dev_out);
@@ -988,7 +990,7 @@ source_ok:
if (!fl.fld_dst)
goto out;
}
- fl.oif = init_net.loopback_dev->ifindex;
+ fl.flowi_oif = init_net.loopback_dev->ifindex;
res.type = RTN_LOCAL;
goto make_route;
}
@@ -998,7 +1000,7 @@ source_ok:
"dn_route_output_slow: initial checks complete."
" dst=%o4x src=%04x oif=%d try_hard=%d\n",
le16_to_cpu(fl.fld_dst), le16_to_cpu(fl.fld_src),
- fl.oif, try_hard);
+ fl.flowi_oif, try_hard);
/*
* N.B. If the kernel is compiled without router support then
@@ -1023,8 +1025,8 @@ source_ok:
if (!try_hard) {
neigh = neigh_lookup_nodev(&dn_neigh_table, &init_net, &fl.fld_dst);
if (neigh) {
- if ((oldflp->oif &&
- (neigh->dev->ifindex != oldflp->oif)) ||
+ if ((oldflp->flowi_oif &&
+ (neigh->dev->ifindex != oldflp->flowi_oif)) ||
(oldflp->fld_src &&
(!dn_dev_islocal(neigh->dev,
oldflp->fld_src)))) {
@@ -1078,7 +1080,7 @@ select_source:
if (fl.fld_src == 0 && res.type != RTN_LOCAL)
goto e_addr;
}
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
goto make_route;
}
free_res = 1;
@@ -1093,14 +1095,14 @@ select_source:
dev_put(dev_out);
dev_out = init_net.loopback_dev;
dev_hold(dev_out);
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
if (res.fi)
dn_fib_info_put(res.fi);
res.fi = NULL;
goto make_route;
}
- if (res.fi->fib_nhs > 1 && fl.oif == 0)
+ if (res.fi->fib_nhs > 1 && fl.flowi_oif == 0)
dn_fib_select_multipath(&fl, &res);
/*
@@ -1115,7 +1117,7 @@ select_source:
dev_put(dev_out);
dev_out = DN_FIB_RES_DEV(res);
dev_hold(dev_out);
- fl.oif = dev_out->ifindex;
+ fl.flowi_oif = dev_out->ifindex;
gateway = DN_FIB_RES_GW(res);
make_route:
@@ -1131,9 +1133,9 @@ make_route:
rt->fl.fld_src = oldflp->fld_src;
rt->fl.fld_dst = oldflp->fld_dst;
- rt->fl.oif = oldflp->oif;
- rt->fl.iif = 0;
- rt->fl.mark = oldflp->mark;
+ rt->fl.flowi_oif = oldflp->flowi_oif;
+ rt->fl.flowi_iif = 0;
+ rt->fl.flowi_mark = oldflp->flowi_mark;
rt->rt_saddr = fl.fld_src;
rt->rt_daddr = fl.fld_dst;
@@ -1201,9 +1203,9 @@ static int __dn_route_output_key(struct dst_entry **pprt, const struct flowi *fl
rt = rcu_dereference_bh(rt->dst.dn_next)) {
if ((flp->fld_dst == rt->fl.fld_dst) &&
(flp->fld_src == rt->fl.fld_src) &&
- (flp->mark == rt->fl.mark) &&
+ (flp->flowi_mark == rt->fl.flowi_mark) &&
dn_is_output_route(rt) &&
- (rt->fl.oif == flp->oif)) {
+ (rt->fl.flowi_oif == flp->flowi_oif)) {
dst_use(&rt->dst, jiffies);
rcu_read_unlock_bh();
*pprt = &rt->dst;
@@ -1221,7 +1223,7 @@ static int dn_route_output_key(struct dst_entry **pprt, struct flowi *flp, int f
int err;
err = __dn_route_output_key(pprt, flp, flags);
- if (err == 0 && flp->proto) {
+ if (err == 0 && flp->flowi_proto) {
*pprt = xfrm_lookup(&init_net, *pprt, flp, NULL, 0);
if (IS_ERR(*pprt)) {
err = PTR_ERR(*pprt);
@@ -1236,9 +1238,9 @@ int dn_route_output_sock(struct dst_entry **pprt, struct flowi *fl, struct sock
int err;
err = __dn_route_output_key(pprt, fl, flags & MSG_TRYHARD);
- if (err == 0 && fl->proto) {
+ if (err == 0 && fl->flowi_proto) {
if (!(flags & MSG_DONTWAIT))
- fl->flags |= FLOWI_FLAG_CAN_SLEEP;
+ fl->flowi_flags |= FLOWI_FLAG_CAN_SLEEP;
*pprt = xfrm_lookup(&init_net, *pprt, fl, sk, 0);
if (IS_ERR(*pprt)) {
err = PTR_ERR(*pprt);
@@ -1260,11 +1262,13 @@ static int dn_route_input_slow(struct sk_buff *skb)
int flags = 0;
__le16 gateway = 0;
__le16 local_src = 0;
- struct flowi fl = { .fld_dst = cb->dst,
- .fld_src = cb->src,
- .fld_scope = RT_SCOPE_UNIVERSE,
- .mark = skb->mark,
- .iif = skb->dev->ifindex };
+ struct flowi fl = {
+ .fld_dst = cb->dst,
+ .fld_src = cb->src,
+ .fld_scope = RT_SCOPE_UNIVERSE,
+ .flowi_mark = skb->mark,
+ .flowi_iif = skb->dev->ifindex,
+ };
struct dn_fib_res res = { .fi = NULL, .type = RTN_UNREACHABLE };
int err = -EINVAL;
int free_res = 0;
@@ -1343,7 +1347,7 @@ static int dn_route_input_slow(struct sk_buff *skb)
if (dn_db->parms.forwarding == 0)
goto e_inval;
- if (res.fi->fib_nhs > 1 && fl.oif == 0)
+ if (res.fi->fib_nhs > 1 && fl.flowi_oif == 0)
dn_fib_select_multipath(&fl, &res);
/*
@@ -1408,9 +1412,9 @@ make_route:
rt->fl.fld_src = cb->src;
rt->fl.fld_dst = cb->dst;
- rt->fl.oif = 0;
- rt->fl.iif = in_dev->ifindex;
- rt->fl.mark = fl.mark;
+ rt->fl.flowi_oif = 0;
+ rt->fl.flowi_iif = in_dev->ifindex;
+ rt->fl.flowi_mark = fl.flowi_mark;
rt->dst.flags = DST_HOST;
rt->dst.neighbour = neigh;
@@ -1482,9 +1486,9 @@ static int dn_route_input(struct sk_buff *skb)
rt = rcu_dereference(rt->dst.dn_next)) {
if ((rt->fl.fld_src == cb->src) &&
(rt->fl.fld_dst == cb->dst) &&
- (rt->fl.oif == 0) &&
- (rt->fl.mark == skb->mark) &am