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/af_inet.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/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index f581f77d1097..f2b61107df6c 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1148,21 +1148,13 @@ int inet_sk_rebuild_header(struct sock *sk) | |||
1148 | struct flowi fl = { | 1148 | struct flowi fl = { |
1149 | .oif = sk->sk_bound_dev_if, | 1149 | .oif = sk->sk_bound_dev_if, |
1150 | .mark = sk->sk_mark, | 1150 | .mark = sk->sk_mark, |
1151 | .nl_u = { | 1151 | .fl4_dst = daddr, |
1152 | .ip4_u = { | 1152 | .fl4_src = inet->inet_saddr, |
1153 | .daddr = daddr, | 1153 | .fl4_tos = RT_CONN_FLAGS(sk), |
1154 | .saddr = inet->inet_saddr, | ||
1155 | .tos = RT_CONN_FLAGS(sk), | ||
1156 | }, | ||
1157 | }, | ||
1158 | .proto = sk->sk_protocol, | 1154 | .proto = sk->sk_protocol, |
1159 | .flags = inet_sk_flowi_flags(sk), | 1155 | .flags = inet_sk_flowi_flags(sk), |
1160 | .uli_u = { | 1156 | .fl_ip_sport = inet->inet_sport, |
1161 | .ports = { | 1157 | .fl_ip_dport = inet->inet_dport, |
1162 | .sport = inet->inet_sport, | ||
1163 | .dport = inet->inet_dport, | ||
1164 | }, | ||
1165 | }, | ||
1166 | }; | 1158 | }; |
1167 | 1159 | ||
1168 | security_sk_classify_flow(sk, &fl); | 1160 | security_sk_classify_flow(sk, &fl); |