diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-11-12 13:43:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-17 15:27:45 -0500 |
commit | 5811662b15db018c740c57d037523683fd3e6123 (patch) | |
tree | f820610a6024799a26699f22dc9a4ef5dee07978 /net/dccp | |
parent | dd68ad2235b4625e0dc928b2b4c614d265f976d3 (diff) |
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 <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 3f69ea114829..45a434f94169 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -462,15 +462,12 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk, | |||
462 | { | 462 | { |
463 | struct rtable *rt; | 463 | struct rtable *rt; |
464 | struct flowi fl = { .oif = skb_rtable(skb)->rt_iif, | 464 | struct flowi fl = { .oif = skb_rtable(skb)->rt_iif, |
465 | .nl_u = { .ip4_u = | 465 | .fl4_dst = ip_hdr(skb)->saddr, |
466 | { .daddr = ip_hdr(skb)->saddr, | 466 | .fl4_src = ip_hdr(skb)->daddr, |
467 | .saddr = ip_hdr(skb)->daddr, | 467 | .fl4_tos = RT_CONN_FLAGS(sk), |
468 | .tos = RT_CONN_FLAGS(sk) } }, | ||
469 | .proto = sk->sk_protocol, | 468 | .proto = sk->sk_protocol, |
470 | .uli_u = { .ports = | 469 | .fl_ip_sport = dccp_hdr(skb)->dccph_dport, |
471 | { .sport = dccp_hdr(skb)->dccph_dport, | 470 | .fl_ip_dport = dccp_hdr(skb)->dccph_sport |
472 | .dport = dccp_hdr(skb)->dccph_sport } | ||
473 | } | ||
474 | }; | 471 | }; |
475 | 472 | ||
476 | security_skb_classify_flow(skb, &fl); | 473 | security_skb_classify_flow(skb, &fl); |