diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-27 21:48:56 -0400 |
commit | 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 (patch) | |
tree | e64954326ced9c365c52c256f01b5f9fb1bcae66 /net/core | |
parent | ed85f2c3b2b72bd20f617ac749f5c22be8d0f66e (diff) | |
parent | 50fd4407b8bfbde7c1a0bfe4f24de7df37164342 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 4 | ||||
-rw-r--r-- | net/core/neighbour.c | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 75c3f7f4edd5..7aa01125287e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3330,7 +3330,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) | |||
3330 | return -EOPNOTSUPP; | 3330 | return -EOPNOTSUPP; |
3331 | 3331 | ||
3332 | case SIOCADDMULTI: | 3332 | case SIOCADDMULTI: |
3333 | if (!dev->set_multicast_list || | 3333 | if ((!dev->set_multicast_list && !dev->set_rx_mode) || |
3334 | ifr->ifr_hwaddr.sa_family != AF_UNSPEC) | 3334 | ifr->ifr_hwaddr.sa_family != AF_UNSPEC) |
3335 | return -EINVAL; | 3335 | return -EINVAL; |
3336 | if (!netif_device_present(dev)) | 3336 | if (!netif_device_present(dev)) |
@@ -3339,7 +3339,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) | |||
3339 | dev->addr_len, 1); | 3339 | dev->addr_len, 1); |
3340 | 3340 | ||
3341 | case SIOCDELMULTI: | 3341 | case SIOCDELMULTI: |
3342 | if (!dev->set_multicast_list || | 3342 | if ((!dev->set_multicast_list && !dev->set_rx_mode) || |
3343 | ifr->ifr_hwaddr.sa_family != AF_UNSPEC) | 3343 | ifr->ifr_hwaddr.sa_family != AF_UNSPEC) |
3344 | return -EINVAL; | 3344 | return -EINVAL; |
3345 | if (!netif_device_present(dev)) | 3345 | if (!netif_device_present(dev)) |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 857915a12c15..d8d0ca99c651 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -466,6 +466,28 @@ out_neigh_release: | |||
466 | goto out; | 466 | goto out; |
467 | } | 467 | } |
468 | 468 | ||
469 | struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, | ||
470 | struct net *net, const void *pkey, struct net_device *dev) | ||
471 | { | ||
472 | struct pneigh_entry *n; | ||
473 | int key_len = tbl->key_len; | ||
474 | u32 hash_val = *(u32 *)(pkey + key_len - 4); | ||
475 | |||
476 | hash_val ^= (hash_val >> 16); | ||
477 | hash_val ^= hash_val >> 8; | ||
478 | hash_val ^= hash_val >> 4; | ||
479 | hash_val &= PNEIGH_HASHMASK; | ||
480 | |||
481 | for (n = tbl->phash_buckets[hash_val]; n; n = n->next) { | ||
482 | if (!memcmp(n->key, pkey, key_len) && | ||
483 | (pneigh_net(n) == net) && | ||
484 | (n->dev == dev || !n->dev)) | ||
485 | break; | ||
486 | } | ||
487 | |||
488 | return n; | ||
489 | } | ||
490 | |||
469 | struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, | 491 | struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, |
470 | struct net *net, const void *pkey, | 492 | struct net *net, const void *pkey, |
471 | struct net_device *dev, int creat) | 493 | struct net_device *dev, int creat) |
@@ -2808,6 +2830,7 @@ EXPORT_SYMBOL(neigh_table_init_no_netlink); | |||
2808 | EXPORT_SYMBOL(neigh_update); | 2830 | EXPORT_SYMBOL(neigh_update); |
2809 | EXPORT_SYMBOL(pneigh_enqueue); | 2831 | EXPORT_SYMBOL(pneigh_enqueue); |
2810 | EXPORT_SYMBOL(pneigh_lookup); | 2832 | EXPORT_SYMBOL(pneigh_lookup); |
2833 | EXPORT_SYMBOL_GPL(__pneigh_lookup); | ||
2811 | 2834 | ||
2812 | #ifdef CONFIG_ARPD | 2835 | #ifdef CONFIG_ARPD |
2813 | EXPORT_SYMBOL(neigh_app_ns); | 2836 | EXPORT_SYMBOL(neigh_app_ns); |