summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/flow.h18
-rw-r--r--include/net/route.h14
2 files changed, 14 insertions, 18 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index 8d5b402d600a..44bd37628f55 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -61,6 +61,13 @@ struct flowi4 {
__be32 daddr;
__be32 saddr;
union flowi_uli uli;
+#define fl4_sport uli.ports.sport
+#define fl4_dport uli.ports.dport
+#define fl4_icmp_type uli.icmpt.type
+#define fl4_icmp_code uli.icmpt.code
+#define fl4_ipsec_spi uli.spi
+#define fl4_mh_type uli.mht.type
+#define fl4_gre_key uli.gre_key
};
struct flowi6 {
@@ -101,8 +108,6 @@ struct flowi {
#define flowi_proto u.__fl_common.flowic_proto
#define flowi_flags u.__fl_common.flowic_flags
#define flowi_secid u.__fl_common.flowic_secid
-#define fl4_tos flowi_tos
-#define fl4_scope flowi_scope
#define fld_scope flowi_scope
#define fld_dst u.dn.daddr
@@ -110,15 +115,6 @@ struct flowi {
#define fl6_dst u.ip6.daddr
#define fl6_src u.ip6.saddr
#define fl6_flowlabel u.ip6.flowlabel
-#define fl4_dst u.ip4.daddr
-#define fl4_src u.ip4.saddr
-#define fl4_sport u.ip4.uli.ports.sport
-#define fl4_dport u.ip4.uli.ports.dport
-#define fl4_icmp_type u.ip4.uli.icmpt.type
-#define fl4_icmp_code u.ip4.uli.icmpt.code
-#define fl4_ipsec_spi u.ip4.uli.spi
-#define fl4_mh_type u.ip4.uli.mht.type
-#define fl4_gre_key u.ip4.uli.gre_key
#define fl6_sport u.ip6.uli.ports.sport
#define fl6_dport u.ip6.uli.ports.dport
#define fl6_icmp_type u.ip6.uli.icmpt.type
diff --git a/include/net/route.h b/include/net/route.h
index 80b0353f4f41..30d6cae3841a 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -157,8 +157,8 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct sock
.saddr = saddr,
.flowi4_tos = tos,
.flowi4_proto = proto,
- .uli.ports.dport = dport,
- .uli.ports.sport = sport,
+ .fl4_dport = dport,
+ .fl4_sport = sport,
};
if (sk)
security_sk_classify_flow(sk, flowi4_to_flowi(&fl4));
@@ -175,7 +175,7 @@ static inline struct rtable *ip_route_output_gre(struct net *net,
.saddr = saddr,
.flowi4_tos = tos,
.flowi4_proto = IPPROTO_GRE,
- .uli.gre_key = gre_key,
+ .fl4_gre_key = gre_key,
};
return ip_route_output_key(net, &fl4);
}
@@ -235,8 +235,8 @@ static inline struct rtable *ip_route_connect(__be32 dst, __be32 src, u32 tos,
.saddr = src,
.flowi4_tos = tos,
.flowi4_proto = protocol,
- .uli.ports.sport = sport,
- .uli.ports.dport = dport,
+ .fl4_sport = sport,
+ .fl4_dport = dport,
};
struct net *net = sock_net(sk);
struct rtable *rt;
@@ -273,8 +273,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
.saddr = rt->rt_key_src,
.flowi4_tos = rt->rt_tos,
.flowi4_proto = protocol,
- .uli.ports.sport = sport,
- .uli.ports.dport = dport
+ .fl4_sport = sport,
+ .fl4_dport = dport
};
if (inet_sk(sk)->transparent)
fl4.flowi4_flags |= FLOWI_FLAG_ANYSRC;