提交 5c70ef85 编写于 作者: G Gao feng 提交者: David S. Miller

veth: allow to setup multicast address for veth device

We can only setup multicast address for network device when
net_device_ops->ndo_set_rx_mode is not null.

Some configurations need to add multicast address for net
device, such as netfilter cluster match module.

Add a fake ndo_set_rx_mode function to allow this operation.
Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b68656b2
...@@ -188,6 +188,11 @@ static struct rtnl_link_stats64 *veth_get_stats64(struct net_device *dev, ...@@ -188,6 +188,11 @@ static struct rtnl_link_stats64 *veth_get_stats64(struct net_device *dev,
return tot; return tot;
} }
/* fake multicast ability */
static void veth_set_multicast_list(struct net_device *dev)
{
}
static int veth_open(struct net_device *dev) static int veth_open(struct net_device *dev)
{ {
struct veth_priv *priv = netdev_priv(dev); struct veth_priv *priv = netdev_priv(dev);
...@@ -250,6 +255,7 @@ static const struct net_device_ops veth_netdev_ops = { ...@@ -250,6 +255,7 @@ static const struct net_device_ops veth_netdev_ops = {
.ndo_start_xmit = veth_xmit, .ndo_start_xmit = veth_xmit,
.ndo_change_mtu = veth_change_mtu, .ndo_change_mtu = veth_change_mtu,
.ndo_get_stats64 = veth_get_stats64, .ndo_get_stats64 = veth_get_stats64,
.ndo_set_rx_mode = veth_set_multicast_list,
.ndo_set_mac_address = eth_mac_addr, .ndo_set_mac_address = eth_mac_addr,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册