diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 21:02:35 -0400 |
commit | 334d094504c2fe1c44211ecb49146ae6bca8c321 (patch) | |
tree | d3c0f68e4b9f8e3d2ccc39e7dfe5de0534a5fad9 /net/sctp/ipv6.c | |
parent | d1a4be630fb068f251d64b62919f143c49ca8057 (diff) | |
parent | d1643d24c61b725bef399cc1cf2944b4c9c23177 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
[NET]: Fix and allocate less memory for ->priv'less netdevices
[IPV6]: Fix dangling references on error in fib6_add().
[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
[PKT_SCHED]: Fix datalen check in tcf_simp_init().
[INET]: Uninline the __inet_inherit_port call.
[INET]: Drop the inet_inherit_port() call.
SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
[netdrvr] forcedeth: internal simplifications; changelog removal
phylib: factor out get_phy_id from within get_phy_device
PHY: add BCM5464 support to broadcom PHY driver
cxgb3: Fix __must_check warning with dev_dbg.
tc35815: Statistics cleanup
natsemi: fix MMIO for PPC 44x platforms
[TIPC]: Cleanup of TIPC reference table code
[TIPC]: Optimized initialization of TIPC reference table
[TIPC]: Remove inlining of reference table locking routines
e1000: convert uint16_t style integers to u16
ixgb: convert uint16_t style integers to u16
sb1000.c: make const arrays static
sb1000.c: stop inlining largish static functions
...
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r-- | net/sctp/ipv6.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 85f1495e0edc..e45e44c60635 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -226,7 +226,7 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport, | |||
226 | 226 | ||
227 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " | 227 | SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " |
228 | "src:" NIP6_FMT " dst:" NIP6_FMT "\n", | 228 | "src:" NIP6_FMT " dst:" NIP6_FMT "\n", |
229 | __FUNCTION__, skb, skb->len, | 229 | __func__, skb, skb->len, |
230 | NIP6(fl.fl6_src), NIP6(fl.fl6_dst)); | 230 | NIP6(fl.fl6_src), NIP6(fl.fl6_dst)); |
231 | 231 | ||
232 | SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); | 232 | SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); |
@@ -251,7 +251,7 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, | |||
251 | 251 | ||
252 | 252 | ||
253 | SCTP_DEBUG_PRINTK("%s: DST=" NIP6_FMT " ", | 253 | SCTP_DEBUG_PRINTK("%s: DST=" NIP6_FMT " ", |
254 | __FUNCTION__, NIP6(fl.fl6_dst)); | 254 | __func__, NIP6(fl.fl6_dst)); |
255 | 255 | ||
256 | if (saddr) { | 256 | if (saddr) { |
257 | ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr); | 257 | ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr); |
@@ -260,7 +260,7 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc, | |||
260 | NIP6(fl.fl6_src)); | 260 | NIP6(fl.fl6_src)); |
261 | } | 261 | } |
262 | 262 | ||
263 | dst = ip6_route_output(NULL, &fl); | 263 | dst = ip6_route_output(&init_net, NULL, &fl); |
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; |
@@ -313,10 +313,13 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
313 | 313 | ||
314 | SCTP_DEBUG_PRINTK("%s: asoc:%p dst:%p " | 314 | SCTP_DEBUG_PRINTK("%s: asoc:%p dst:%p " |
315 | "daddr:" NIP6_FMT " ", | 315 | "daddr:" NIP6_FMT " ", |
316 | __FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr)); | 316 | __func__, asoc, dst, NIP6(daddr->v6.sin6_addr)); |
317 | 317 | ||
318 | if (!asoc) { | 318 | if (!asoc) { |
319 | ipv6_get_saddr(dst, &daddr->v6.sin6_addr,&saddr->v6.sin6_addr); | 319 | ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, |
320 | &daddr->v6.sin6_addr, | ||
321 | inet6_sk(asoc->base.sk)->srcprefs, | ||
322 | &saddr->v6.sin6_addr); | ||
320 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", | 323 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", |
321 | NIP6(saddr->v6.sin6_addr)); | 324 | NIP6(saddr->v6.sin6_addr)); |
322 | return; | 325 | return; |
@@ -351,7 +354,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
351 | } else { | 354 | } else { |
352 | printk(KERN_ERR "%s: asoc:%p Could not find a valid source " | 355 | printk(KERN_ERR "%s: asoc:%p Could not find a valid source " |
353 | "address for the dest:" NIP6_FMT "\n", | 356 | "address for the dest:" NIP6_FMT "\n", |
354 | __FUNCTION__, asoc, NIP6(daddr->v6.sin6_addr)); | 357 | __func__, asoc, NIP6(daddr->v6.sin6_addr)); |
355 | } | 358 | } |
356 | 359 | ||
357 | rcu_read_unlock(); | 360 | rcu_read_unlock(); |
@@ -634,7 +637,7 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk, | |||
634 | struct ipv6_pinfo *newnp, *np = inet6_sk(sk); | 637 | struct ipv6_pinfo *newnp, *np = inet6_sk(sk); |
635 | struct sctp6_sock *newsctp6sk; | 638 | struct sctp6_sock *newsctp6sk; |
636 | 639 | ||
637 | newsk = sk_alloc(sk->sk_net, PF_INET6, GFP_KERNEL, sk->sk_prot); | 640 | newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot); |
638 | if (!newsk) | 641 | if (!newsk) |
639 | goto out; | 642 | goto out; |
640 | 643 | ||