aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/route.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/route.h')
-rw-r--r--include/net/route.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/net/route.h b/include/net/route.h
index f140f4130fea..3d814f84abd0 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,
136 __be32 saddr, u8 tos, int oif) 136 __be32 saddr, u8 tos, int oif)
137{ 137{
138 struct flowi fl = { 138 struct flowi fl = {
139 .oif = oif, 139 .flowi_oif = oif,
140 .fl4_dst = daddr, 140 .fl4_dst = daddr,
141 .fl4_src = saddr, 141 .fl4_src = saddr,
142 .fl4_tos = tos, 142 .fl4_tos = tos,
@@ -150,13 +150,13 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct sock
150 __u8 proto, __u8 tos, int oif) 150 __u8 proto, __u8 tos, int oif)
151{ 151{
152 struct flowi fl = { 152 struct flowi fl = {
153 .oif = oif, 153 .flowi_oif = oif,
154 .flags = sk ? inet_sk_flowi_flags(sk) : 0, 154 .flowi_flags = sk ? inet_sk_flowi_flags(sk) : 0,
155 .mark = sk ? sk->sk_mark : 0, 155 .flowi_mark = sk ? sk->sk_mark : 0,
156 .fl4_dst = daddr, 156 .fl4_dst = daddr,
157 .fl4_src = saddr, 157 .fl4_src = saddr,
158 .fl4_tos = tos, 158 .fl4_tos = tos,
159 .proto = proto, 159 .flowi_proto = proto,
160 .fl_ip_dport = dport, 160 .fl_ip_dport = dport,
161 .fl_ip_sport = sport, 161 .fl_ip_sport = sport,
162 }; 162 };
@@ -170,11 +170,11 @@ static inline struct rtable *ip_route_output_gre(struct net *net,
170 __be32 gre_key, __u8 tos, int oif) 170 __be32 gre_key, __u8 tos, int oif)
171{ 171{
172 struct flowi fl = { 172 struct flowi fl = {
173 .oif = oif, 173 .flowi_oif = oif,
174 .fl4_dst = daddr, 174 .fl4_dst = daddr,
175 .fl4_src = saddr, 175 .fl4_src = saddr,
176 .fl4_tos = tos, 176 .fl4_tos = tos,
177 .proto = IPPROTO_GRE, 177 .flowi_proto = IPPROTO_GRE,
178 .fl_gre_key = gre_key, 178 .fl_gre_key = gre_key,
179 }; 179 };
180 return ip_route_output_key(net, &fl); 180 return ip_route_output_key(net, &fl);
@@ -228,23 +228,23 @@ static inline struct rtable *ip_route_connect(__be32 dst, __be32 src, u32 tos,
228 __be16 sport, __be16 dport, 228 __be16 sport, __be16 dport,
229 struct sock *sk, bool can_sleep) 229 struct sock *sk, bool can_sleep)
230{ 230{
231 struct flowi fl = { .oif = oif, 231 struct flowi fl = { .flowi_oif = oif,
232 .mark = sk->sk_mark, 232 .flowi_mark = sk->sk_mark,
233 .fl4_dst = dst, 233 .fl4_dst = dst,
234 .fl4_src = src, 234 .fl4_src = src,
235 .fl4_tos = tos, 235 .fl4_tos = tos,
236 .proto = protocol, 236 .flowi_proto = protocol,
237 .fl_ip_sport = sport, 237 .fl_ip_sport = sport,
238 .fl_ip_dport = dport }; 238 .fl_ip_dport = dport };
239 struct net *net = sock_net(sk); 239 struct net *net = sock_net(sk);
240 struct rtable *rt; 240 struct rtable *rt;
241 241
242 if (inet_sk(sk)->transparent) 242 if (inet_sk(sk)->transparent)
243 fl.flags |= FLOWI_FLAG_ANYSRC; 243 fl.flowi_flags |= FLOWI_FLAG_ANYSRC;
244 if (protocol == IPPROTO_TCP) 244 if (protocol == IPPROTO_TCP)
245 fl.flags |= FLOWI_FLAG_PRECOW_METRICS; 245 fl.flowi_flags |= FLOWI_FLAG_PRECOW_METRICS;
246 if (can_sleep) 246 if (can_sleep)
247 fl.flags |= FLOWI_FLAG_CAN_SLEEP; 247 fl.flowi_flags |= FLOWI_FLAG_CAN_SLEEP;
248 248
249 if (!dst || !src) { 249 if (!dst || !src) {
250 rt = __ip_route_output_key(net, &fl); 250 rt = __ip_route_output_key(net, &fl);
@@ -264,19 +264,19 @@ static inline struct rtable *ip_route_newports(struct rtable *rt,
264 __be16 dport, struct sock *sk) 264 __be16 dport, struct sock *sk)
265{ 265{
266 if (sport != orig_sport || dport != orig_dport) { 266 if (sport != orig_sport || dport != orig_dport) {
267 struct flowi fl = { .oif = rt->rt_oif, 267 struct flowi fl = { .flowi_oif = rt->rt_oif,
268 .mark = rt->rt_mark, 268 .flowi_mark = rt->rt_mark,
269 .fl4_dst = rt->rt_key_dst, 269 .fl4_dst = rt->rt_key_dst,
270 .fl4_src = rt->rt_key_src, 270 .fl4_src = rt->rt_key_src,
271 .fl4_tos = rt->rt_tos, 271 .fl4_tos = rt->rt_tos,
272 .proto = protocol, 272 .flowi_proto = protocol,
273 .fl_ip_sport = sport, 273 .fl_ip_sport = sport,
274 .fl_ip_dport = dport }; 274 .fl_ip_dport = dport };
275 275
276 if (inet_sk(sk)->transparent) 276 if (inet_sk(sk)->transparent)
277 fl.flags |= FLOWI_FLAG_ANYSRC; 277 fl.flowi_flags |= FLOWI_FLAG_ANYSRC;
278 if (protocol == IPPROTO_TCP) 278 if (protocol == IPPROTO_TCP)
279 fl.flags |= FLOWI_FLAG_PRECOW_METRICS; 279 fl.flowi_flags |= FLOWI_FLAG_PRECOW_METRICS;
280 ip_rt_put(rt); 280 ip_rt_put(rt);
281 security_sk_classify_flow(sk, &fl); 281 security_sk_classify_flow(sk, &fl);
282 return ip_route_output_flow(sock_net(sk), &fl, sk); 282 return ip_route_output_flow(sock_net(sk), &fl, sk);