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/l2tp/l2tp_ip.c | |
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/l2tp/l2tp_ip.c')
-rw-r--r-- | net/l2tp/l2tp_ip.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 0bf6a59545ab..04635e88e8ed 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c | |||
@@ -476,15 +476,13 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m | |||
476 | 476 | ||
477 | { | 477 | { |
478 | struct flowi fl = { .oif = sk->sk_bound_dev_if, | 478 | struct flowi fl = { .oif = sk->sk_bound_dev_if, |
479 | .nl_u = { .ip4_u = { | 479 | .fl4_dst = daddr, |
480 | .daddr = daddr, | 480 | .fl4_src = inet->inet_saddr, |
481 | .saddr = inet->inet_saddr, | 481 | .fl4_tos = RT_CONN_FLAGS(sk), |
482 | .tos = RT_CONN_FLAGS(sk) } }, | ||
483 | .proto = sk->sk_protocol, | 482 | .proto = sk->sk_protocol, |
484 | .flags = inet_sk_flowi_flags(sk), | 483 | .flags = inet_sk_flowi_flags(sk), |
485 | .uli_u = { .ports = { | 484 | .fl_ip_sport = inet->inet_sport, |
486 | .sport = inet->inet_sport, | 485 | .fl_ip_dport = inet->inet_dport }; |
487 | .dport = inet->inet_dport } } }; | ||
488 | 486 | ||
489 | /* If this fails, retransmit mechanism of transport layer will | 487 | /* If this fails, retransmit mechanism of transport layer will |
490 | * keep trying until route appears or the connection times | 488 | * keep trying until route appears or the connection times |