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/ipv4/udp.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/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 491ecd3f7a01..b37181da487c 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -890,15 +890,13 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
890 | if (rt == NULL) { | 890 | if (rt == NULL) { |
891 | struct flowi fl = { .oif = ipc.oif, | 891 | struct flowi fl = { .oif = ipc.oif, |
892 | .mark = sk->sk_mark, | 892 | .mark = sk->sk_mark, |
893 | .nl_u = { .ip4_u = | 893 | .fl4_dst = faddr, |
894 | { .daddr = faddr, | 894 | .fl4_src = saddr, |
895 | .saddr = saddr, | 895 | .fl4_tos = tos, |
896 | .tos = tos } }, | ||
897 | .proto = sk->sk_protocol, | 896 | .proto = sk->sk_protocol, |
898 | .flags = inet_sk_flowi_flags(sk), | 897 | .flags = inet_sk_flowi_flags(sk), |
899 | .uli_u = { .ports = | 898 | .fl_ip_sport = inet->inet_sport, |
900 | { .sport = inet->inet_sport, | 899 | .fl_ip_dport = dport }; |
901 | .dport = dport } } }; | ||
902 | struct net *net = sock_net(sk); | 900 | struct net *net = sock_net(sk); |
903 | 901 | ||
904 | security_sk_classify_flow(sk, &fl); | 902 | security_sk_classify_flow(sk, &fl); |