mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: use the macros defined for the members of flowi
Use the macros defined for the members of flowi to clean the code up. Signed-off-by: Changli Gao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
dd68ad2235
commit
5811662b15
32 changed files with 171 additions and 316 deletions
|
|
@ -462,15 +462,12 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
|
|||
{
|
||||
struct rtable *rt;
|
||||
struct flowi fl = { .oif = skb_rtable(skb)->rt_iif,
|
||||
.nl_u = { .ip4_u =
|
||||
{ .daddr = ip_hdr(skb)->saddr,
|
||||
.saddr = ip_hdr(skb)->daddr,
|
||||
.tos = RT_CONN_FLAGS(sk) } },
|
||||
.fl4_dst = ip_hdr(skb)->saddr,
|
||||
.fl4_src = ip_hdr(skb)->daddr,
|
||||
.fl4_tos = RT_CONN_FLAGS(sk),
|
||||
.proto = sk->sk_protocol,
|
||||
.uli_u = { .ports =
|
||||
{ .sport = dccp_hdr(skb)->dccph_dport,
|
||||
.dport = dccp_hdr(skb)->dccph_sport }
|
||||
}
|
||||
.fl_ip_sport = dccp_hdr(skb)->dccph_dport,
|
||||
.fl_ip_dport = dccp_hdr(skb)->dccph_sport
|
||||
};
|
||||
|
||||
security_skb_classify_flow(skb, &fl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue