SHA256
1
0
forked from pool/openvswitch
openvswitch/stp-fwd-delay.patch

49 lines
1.4 KiB
Diff
Raw Normal View History

brcompat: add stp and forwarding delay call stubs to brcompat layer
From: Patrick Mullaney <pm.mullaney@gmail.com>
libvirt and various startup scripts like to set these 2 attributes
---
datapath/brcompat.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/datapath/brcompat.c b/datapath/brcompat.c
index f23db93..eefb7c3 100644
--- a/datapath/brcompat.c
+++ b/datapath/brcompat.c
@@ -310,6 +310,19 @@ nla_put_failure:
return -ENOMEM;
}
+static int brc_set_bridge_forward_delay(struct net_device *dev,
+ unsigned long delay)
+{
+ printk("attempting to set bridge forward delay %u\n", delay);
+ return 0;
+}
+
+static int brc_stp_set_enabled(struct net_device *dev, unsigned long state)
+{
+ printk("attempting to set bridge STP to %u\n", state);
+ return 0;
+}
+
/* Legacy ioctl's through SIOCDEVPRIVATE. Called with rtnl_lock. */
static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
@@ -333,6 +346,12 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
case BRCTL_GET_FDB_ENTRIES:
return brc_get_fdb_entries(dev, (void __user *)args[1],
args[2], args[3]);
+ case BRCTL_SET_BRIDGE_FORWARD_DELAY:
+ return brc_set_bridge_forward_delay(dev, args[1]);
+
+ case BRCTL_SET_BRIDGE_STP_STATE:
+ return brc_stp_set_enabled(dev, args[1]);
+
}
return -EOPNOTSUPP;