From: yaolingfei <[email protected]>
Signed-off-by: yaolingfei <[email protected]>
---
vswitchd/bridge.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 475eefefa..dd7b78089 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -4015,10 +4015,10 @@ bridge_configure_remotes(struct bridge *br,
for (size_t i = 0; i < n_controllers; i++) {
struct ovsrec_controller *c = controllers[i];
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(2, 5);
if (daemon_should_self_confine()
&& (!strncmp(c->target, "punix:", 6)
|| !strncmp(c->target, "unix:", 5))) {
- static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
char *allowed;
if (!strncmp(c->target, "unix:", 5)) {
@@ -4063,6 +4063,11 @@ bridge_configure_remotes(struct bridge *br,
free(allowed);
}
+ if (shash_find(&ocs, c->target)) {
+ VLOG_WARN_RL(&rl, "bridge %s: Duplicate controllers \"%s\"",
br->name, c->target);
+ continue;
+ }
+
bridge_configure_local_iface_netdev(br, c);
int dscp = smap_get_int(&c->other_config, "dscp", DSCP_DEFAULT);
--
2.40.1.windows.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev