[ovs-dev] [PATCH] ipfix: allow empty targets column in table IPFIX
Romain Lenglet
rlenglet at vmware.com
Tue Nov 5 19:24:59 UTC 2013
Signed-off-by: Romain Lenglet <rlenglet at vmware.com>
---
vswitchd/bridge.c | 6 ++++--
vswitchd/vswitch.ovsschema | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 8f45870..cf70b0c 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -995,7 +995,8 @@ bridge_configure_ipfix(struct bridge *br)
size_t n_fe_opts = 0;
OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH(fe_cfg, idl) {
- if (fe_cfg->ipfix && fe_cfg->bridge == br->cfg) {
+ if (fe_cfg->ipfix && fe_cfg->ipfix->n_targets
+ && fe_cfg->bridge == br->cfg) {
n_fe_opts++;
}
}
@@ -1035,7 +1036,8 @@ bridge_configure_ipfix(struct bridge *br)
fe_opts = xcalloc(n_fe_opts, sizeof *fe_opts);
opts = fe_opts;
OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH(fe_cfg, idl) {
- if (fe_cfg->ipfix && fe_cfg->bridge == br->cfg) {
+ if (fe_cfg->ipfix && fe_cfg->ipfix->n_targets
+ && fe_cfg->bridge == br->cfg) {
opts->collector_set_id = fe_cfg->id;
sset_init(&opts->targets);
sset_add_array(&opts->targets, fe_cfg->ipfix->targets,
diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema
index 78ebc89..9392457 100644
--- a/vswitchd/vswitch.ovsschema
+++ b/vswitchd/vswitch.ovsschema
@@ -1,6 +1,6 @@
{"name": "Open_vSwitch",
"version": "7.3.0",
- "cksum": "2811681289 20311",
+ "cksum": "2495231516 20311",
"tables": {
"Open_vSwitch": {
"columns": {
@@ -412,7 +412,7 @@
"IPFIX": {
"columns": {
"targets": {
- "type": {"key": "string", "min": 1, "max": "unlimited"}},
+ "type": {"key": "string", "min": 0, "max": "unlimited"}},
"sampling": {
"type": {"key": {"type": "integer",
"minInteger": 1,
--
1.7.9.5
More information about the dev
mailing list