diff options
author | Patrick McHardy <kaber@trash.net> | 2008-03-26 02:12:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-26 02:12:11 -0700 |
commit | 61ee6bd487b9cc160e533034eb338f2085dc7922 (patch) | |
tree | 33502a9da58f26f3b948f18288c0669b898db030 /net/core/dev.c | |
parent | 8c7230f781749cd7261b504c0bfa188bb96e77ee (diff) | |
download | op-kernel-dev-61ee6bd487b9cc160e533034eb338f2085dc7922.zip op-kernel-dev-61ee6bd487b9cc160e533034eb338f2085dc7922.tar.gz |
[NET]: Fix multicast device ioctl checks
SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list
method to determine whether it supports multicast. Drivers implementing
secondary unicast support use set_rx_mode however.
Check for both dev->set_multicast_mode and dev->set_rx_mode to determine
multicast capabilities.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index fcdf03c..460e7f9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3329,7 +3329,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) return -EOPNOTSUPP; case SIOCADDMULTI: - if (!dev->set_multicast_list || + if ((!dev->set_multicast_list && !dev->set_rx_mode) || ifr->ifr_hwaddr.sa_family != AF_UNSPEC) return -EINVAL; if (!netif_device_present(dev)) @@ -3338,7 +3338,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) dev->addr_len, 1); case SIOCDELMULTI: - if (!dev->set_multicast_list || + if ((!dev->set_multicast_list && !dev->set_rx_mode) || ifr->ifr_hwaddr.sa_family != AF_UNSPEC) return -EINVAL; if (!netif_device_present(dev)) |