Skip to content

Commit 36395b2

Browse files
committed
Merge branch 'remove-RTO_ONLINK-users'
Guillaume Nault says: ==================== net: Remove more RTO_ONLINK users. Code that initialise a flowi4 structure manually before doing a fib lookup can easily avoid overloading ->flowi4_tos with the RTO_ONLINK bit. They can just set ->flowi4_scope correctly instead. Properly separating the routing scope from ->flowi4_tos will allow to eventually convert this field to dscp_t (to ensure proper separation between DSCP and ECN). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 5861e82 + ba80e20 commit 36395b2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

drivers/net/gtp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ static struct rtable *ip4_route_output_gtp(struct flowi4 *fl4,
243243
fl4->flowi4_oif = sk->sk_bound_dev_if;
244244
fl4->daddr = daddr;
245245
fl4->saddr = saddr;
246-
fl4->flowi4_tos = RT_CONN_FLAGS(sk);
246+
fl4->flowi4_tos = ip_sock_rt_tos(sk);
247+
fl4->flowi4_scope = ip_sock_rt_scope(sk);
247248
fl4->flowi4_proto = sk->sk_protocol;
248249

249250
return ip_route_output_key(sock_net(sk), fl4);

net/dccp/ipv4.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
474474
.flowi4_oif = inet_iif(skb),
475475
.daddr = iph->saddr,
476476
.saddr = iph->daddr,
477-
.flowi4_tos = RT_CONN_FLAGS(sk),
477+
.flowi4_tos = ip_sock_rt_tos(sk),
478+
.flowi4_scope = ip_sock_rt_scope(sk),
478479
.flowi4_proto = sk->sk_protocol,
479480
.fl4_sport = dccp_hdr(skb)->dccph_dport,
480481
.fl4_dport = dccp_hdr(skb)->dccph_sport,

net/sctp/protocol.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
435435
fl4->fl4_dport = daddr->v4.sin_port;
436436
fl4->flowi4_proto = IPPROTO_SCTP;
437437
if (asoc) {
438-
fl4->flowi4_tos = RT_CONN_FLAGS_TOS(asoc->base.sk, tos);
438+
fl4->flowi4_tos = RT_TOS(tos);
439+
fl4->flowi4_scope = ip_sock_rt_scope(asoc->base.sk);
439440
fl4->flowi4_oif = asoc->base.sk->sk_bound_dev_if;
440441
fl4->fl4_sport = htons(asoc->base.bind_addr.port);
441442
}

0 commit comments

Comments
 (0)