diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 16:22:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:54 -0500 |
commit | 4c9483b2fb5d2548c3cc1fe03cdd4484ceeb5d1c (patch) | |
tree | c29c8070012cffb38fe249cf528589a675f622b1 /net/sctp/ipv6.c | |
parent | 9cce96df5b76691712dba22e83ff5efe900361e1 (diff) |
ipv6: Convert to use flowi6 where applicable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r-- | net/sctp/ipv6.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 831627156884..865ce7ba4e14 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -201,40 +201,40 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport) | |||
201 | { | 201 | { |
202 | struct sock *sk = skb->sk; | 202 | struct sock *sk = skb->sk; |
203 | struct ipv6_pinfo *np = inet6_sk(sk); | 203 | struct ipv6_pinfo *np = inet6_sk(sk); |
204 | struct flowi fl; | 204 | struct flowi6 fl6; |
205 | 205 | ||
206 | memset(&fl, 0, sizeof(fl)); | 206 | memset(&fl6, 0, sizeof(fl6)); |
207 | 207 | ||
208 | fl.flowi_proto = sk->sk_protocol; | 208 | fl6.flowi6_proto = sk->sk_protocol; |
209 | 209 | ||
210 | /* Fill in the dest address from the route entry passed with the skb | 210 | /* Fill in the dest address from the route entry passed with the skb |
211 | * and the source address from the transport. | 211 | * and the source address from the transport. |
212 | */ | 212 | */ |
213 | ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr.v6.sin6_addr); | 213 | ipv6_addr_copy(&fl6.daddr, &transport->ipaddr.v6.sin6_addr); |
214 | ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr); | 214 | ipv6_addr_copy(&fl6.saddr, &transport->saddr.v6.sin6_addr); |
215 | 215 | ||
216 | fl.fl6_flowlabel = np->flow_label; | 216 | fl6.flowlabel = np->flow_label; |
217 | IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel); | 217 | IP6_ECN_flow_xmit(sk, fl6.flowlabel); |
218 | if (ipv6_addr_type(&fl.fl6_src) & IPV6_ADDR_LINKLOCAL) | 218 | if (ipv6_addr_type(&fl6.saddr) & IPV6_ADDR_LINKLOCAL) |
219 | fl.flowi_oif = transport->saddr.v6.sin6_scope_id; | 219 | fl6.flowi6_oif = transport->saddr.v6.sin6_scope_id; |
220 | else | 220 | else |
221 | fl.flowi_oif = sk->sk_bound_dev_if; | 221 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
222 | 222 | ||
223 | if (np->opt && np->opt->srcrt) { | 223 | if (np->opt && np->opt->srcrt) { |
224 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; | 224 | struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; |
225 | ipv6_addr_copy(&fl.fl6_dst, rt0->addr); | 225 | ipv6_addr_copy(&fl6.daddr, rt0->addr); |
226 | } | 226 | } |
227 | 227 | ||
228 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n", | 228 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n", |
229 | __func__, skb, skb->len, | 229 | __func__, skb, skb->len, |
230 | &fl.fl6_src, &fl.fl6_dst); | 230 | &fl6.saddr, &fl6.daddr); |
231 | 231 | ||
232 | SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); | 232 | SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); |
233 | 233 | ||
234 | if (!(transport->param_flags & SPP_PMTUD_ENABLE)) | 234 | if (!(transport->param_flags & SPP_PMTUD_ENABLE)) |
235 | skb->local_df = 1; | 235 | skb->local_df = 1; |
236 | 236 | ||
237 | return ip6_xmit(sk, skb, &fl, np->opt); | 237 | return ip6_xmit(sk, skb, &fl6, np->opt); |
238 | } | 238 | } |
239 | 239 | ||
240 | /* Returns the dst cache entry for the given source and destination ip | 240 | /* Returns the dst cache entry for the given source and destination ip |
@@ -245,22 +245,22 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, | |||
245 | union sctp_addr *saddr) | 245 | union sctp_addr *saddr) |
246 | { | 246 | { |
247 | struct dst_entry *dst; | 247 | struct dst_entry *dst; |
248 | struct flowi fl; | 248 | struct flowi6 fl6; |
249 | 249 | ||
250 | memset(&fl, 0, sizeof(fl)); | 250 | memset(&fl6, 0, sizeof(fl6)); |
251 | ipv6_addr_copy(&fl.fl6_dst, &daddr->v6.sin6_addr); | 251 | ipv6_addr_copy(&fl6.daddr, &daddr->v6.sin6_addr); |
252 | if (ipv6_addr_type(&daddr->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL) | 252 | if (ipv6_addr_type(&daddr->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL) |
253 | fl.flowi_oif = daddr->v6.sin6_scope_id; | 253 | fl6.flowi6_oif = daddr->v6.sin6_scope_id; |
254 | 254 | ||
255 | 255 | ||
256 | SCTP_DEBUG_PRINTK("%s: DST=%pI6 ", __func__, &fl.fl6_dst); | 256 | SCTP_DEBUG_PRINTK("%s: DST=%pI6 ", __func__, &fl6.daddr); |
257 | 257 | ||
258 | if (saddr) { | 258 | if (saddr) { |
259 | ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr); | 259 | ipv6_addr_copy(&fl6.saddr, &saddr->v6.sin6_addr); |
260 | SCTP_DEBUG_PRINTK("SRC=%pI6 - ", &fl.fl6_src); | 260 | SCTP_DEBUG_PRINTK("SRC=%pI6 - ", &fl6.saddr); |
261 | } | 261 | } |
262 | 262 | ||
263 | dst = ip6_route_output(&init_net, NULL, &fl); | 263 | dst = ip6_route_output(&init_net, NULL, &fl6); |
264 | if (!dst->error) { | 264 | if (!dst->error) { |
265 | struct rt6_info *rt; | 265 | struct rt6_info *rt; |
266 | rt = (struct rt6_info *)dst; | 266 | rt = (struct rt6_info *)dst; |