diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
commit | 7a6362800cb7d1d618a697a650c7aaed3eb39320 (patch) | |
tree | 087f9bc6c13ef1fad4b392c5cf9325cd28fa8523 /net/ipv6/mcast.c | |
parent | 6445ced8670f37cfc2c5e24a9de9b413dbfc788d (diff) | |
parent | ceda86a108671294052cbf51660097b6534672f5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
bonding: enable netpoll without checking link status
xfrm: Refcount destination entry on xfrm_lookup
net: introduce rx_handler results and logic around that
bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
bonding: wrap slave state work
net: get rid of multiple bond-related netdevice->priv_flags
bonding: register slave pointer for rx_handler
be2net: Bump up the version number
be2net: Copyright notice change. Update to Emulex instead of ServerEngines
e1000e: fix kconfig for crc32 dependency
netfilter ebtables: fix xt_AUDIT to work with ebtables
xen network backend driver
bonding: Improve syslog message at device creation time
bonding: Call netif_carrier_off after register_netdevice
bonding: Incorrect TX queue offset
net_sched: fix ip_tos2prio
xfrm: fix __xfrm_route_forward()
be2net: Fix UDP packet detected status in RX compl
Phonet: fix aligned-mode pipe socket buffer header reserve
netxen: support for GbE port settings
...
Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
with the staging updates.
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 49f986d626a0..76b893771e6e 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -319,7 +319,6 @@ int ip6_mc_source(int add, int omode, struct sock *sk, | |||
319 | { | 319 | { |
320 | struct in6_addr *source, *group; | 320 | struct in6_addr *source, *group; |
321 | struct ipv6_mc_socklist *pmc; | 321 | struct ipv6_mc_socklist *pmc; |
322 | struct net_device *dev; | ||
323 | struct inet6_dev *idev; | 322 | struct inet6_dev *idev; |
324 | struct ipv6_pinfo *inet6 = inet6_sk(sk); | 323 | struct ipv6_pinfo *inet6 = inet6_sk(sk); |
325 | struct ip6_sf_socklist *psl; | 324 | struct ip6_sf_socklist *psl; |
@@ -341,7 +340,6 @@ int ip6_mc_source(int add, int omode, struct sock *sk, | |||
341 | rcu_read_unlock(); | 340 | rcu_read_unlock(); |
342 | return -ENODEV; | 341 | return -ENODEV; |
343 | } | 342 | } |
344 | dev = idev->dev; | ||
345 | 343 | ||
346 | err = -EADDRNOTAVAIL; | 344 | err = -EADDRNOTAVAIL; |
347 | 345 | ||
@@ -455,7 +453,6 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf) | |||
455 | { | 453 | { |
456 | struct in6_addr *group; | 454 | struct in6_addr *group; |
457 | struct ipv6_mc_socklist *pmc; | 455 | struct ipv6_mc_socklist *pmc; |
458 | struct net_device *dev; | ||
459 | struct inet6_dev *idev; | 456 | struct inet6_dev *idev; |
460 | struct ipv6_pinfo *inet6 = inet6_sk(sk); | 457 | struct ipv6_pinfo *inet6 = inet6_sk(sk); |
461 | struct ip6_sf_socklist *newpsl, *psl; | 458 | struct ip6_sf_socklist *newpsl, *psl; |
@@ -478,7 +475,6 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf) | |||
478 | rcu_read_unlock(); | 475 | rcu_read_unlock(); |
479 | return -ENODEV; | 476 | return -ENODEV; |
480 | } | 477 | } |
481 | dev = idev->dev; | ||
482 | 478 | ||
483 | err = 0; | 479 | err = 0; |
484 | 480 | ||
@@ -549,7 +545,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | |||
549 | struct in6_addr *group; | 545 | struct in6_addr *group; |
550 | struct ipv6_mc_socklist *pmc; | 546 | struct ipv6_mc_socklist *pmc; |
551 | struct inet6_dev *idev; | 547 | struct inet6_dev *idev; |
552 | struct net_device *dev; | ||
553 | struct ipv6_pinfo *inet6 = inet6_sk(sk); | 548 | struct ipv6_pinfo *inet6 = inet6_sk(sk); |
554 | struct ip6_sf_socklist *psl; | 549 | struct ip6_sf_socklist *psl; |
555 | struct net *net = sock_net(sk); | 550 | struct net *net = sock_net(sk); |
@@ -566,7 +561,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | |||
566 | rcu_read_unlock(); | 561 | rcu_read_unlock(); |
567 | return -ENODEV; | 562 | return -ENODEV; |
568 | } | 563 | } |
569 | dev = idev->dev; | ||
570 | 564 | ||
571 | err = -EADDRNOTAVAIL; | 565 | err = -EADDRNOTAVAIL; |
572 | /* | 566 | /* |
@@ -1402,7 +1396,7 @@ static void mld_sendpack(struct sk_buff *skb) | |||
1402 | struct inet6_dev *idev; | 1396 | struct inet6_dev *idev; |
1403 | struct net *net = dev_net(skb->dev); | 1397 | struct net *net = dev_net(skb->dev); |
1404 | int err; | 1398 | int err; |
1405 | struct flowi fl; | 1399 | struct flowi6 fl6; |
1406 | struct dst_entry *dst; | 1400 | struct dst_entry *dst; |
1407 | 1401 | ||
1408 | rcu_read_lock(); | 1402 | rcu_read_lock(); |
@@ -1425,11 +1419,16 @@ static void mld_sendpack(struct sk_buff *skb) | |||
1425 | goto err_out; | 1419 | goto err_out; |
1426 | } | 1420 | } |
1427 | 1421 | ||
1428 | icmpv6_flow_init(net->ipv6.igmp_sk, &fl, ICMPV6_MLD2_REPORT, | 1422 | icmpv6_flow_init(net->ipv6.igmp_sk, &fl6, ICMPV6_MLD2_REPORT, |
1429 | &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, | 1423 | &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, |
1430 | skb->dev->ifindex); | 1424 | skb->dev->ifindex); |
1431 | 1425 | ||
1432 | err = xfrm_lookup(net, &dst, &fl, NULL, 0); | 1426 | dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); |
1427 | err = 0; | ||
1428 | if (IS_ERR(dst)) { | ||
1429 | err = PTR_ERR(dst); | ||
1430 | dst = NULL; | ||
1431 | } | ||
1433 | skb_dst_set(skb, dst); | 1432 | skb_dst_set(skb, dst); |
1434 | if (err) | 1433 | if (err) |
1435 | goto err_out; | 1434 | goto err_out; |
@@ -1732,7 +1731,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type) | |||
1732 | u8 ra[8] = { IPPROTO_ICMPV6, 0, | 1731 | u8 ra[8] = { IPPROTO_ICMPV6, 0, |
1733 | IPV6_TLV_ROUTERALERT, 2, 0, 0, | 1732 | IPV6_TLV_ROUTERALERT, 2, 0, 0, |
1734 | IPV6_TLV_PADN, 0 }; | 1733 | IPV6_TLV_PADN, 0 }; |
1735 | struct flowi fl; | 1734 | struct flowi6 fl6; |
1736 | struct dst_entry *dst; | 1735 | struct dst_entry *dst; |
1737 | 1736 | ||
1738 | if (type == ICMPV6_MGM_REDUCTION) | 1737 | if (type == ICMPV6_MGM_REDUCTION) |
@@ -1792,13 +1791,15 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type) | |||
1792 | goto err_out; | 1791 | goto err_out; |
1793 | } | 1792 | } |
1794 | 1793 | ||
1795 | icmpv6_flow_init(sk, &fl, type, | 1794 | icmpv6_flow_init(sk, &fl6, type, |
1796 | &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, | 1795 | &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, |
1797 | skb->dev->ifindex); | 1796 | skb->dev->ifindex); |
1798 | 1797 | ||
1799 | err = xfrm_lookup(net, &dst, &fl, NULL, 0); | 1798 | dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); |
1800 | if (err) | 1799 | if (IS_ERR(dst)) { |
1800 | err = PTR_ERR(dst); | ||
1801 | goto err_out; | 1801 | goto err_out; |
1802 | } | ||
1802 | 1803 | ||
1803 | skb_dst_set(skb, dst); | 1804 | skb_dst_set(skb, dst); |
1804 | err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, | 1805 | err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, |