From: "Eduardo Lima (Etrunko)" <eblima(a)br.ibm.com>
According to libvirt network filters specification, new values have been added:
Since 0.9.0:
- reject
Since 0.9.7:
- return
- continue
Signed-off-by: Eduardo Lima (Etrunko) <eblima(a)br.ibm.com>
---
schema/FilterEntry.mof | 8 ++++----
src/Virt_FilterEntry.c | 10 ++++++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/schema/FilterEntry.mof b/schema/FilterEntry.mof
index f60abae..b5f695f 100644
--- a/schema/FilterEntry.mof
+++ b/schema/FilterEntry.mof
@@ -6,8 +6,8 @@ class KVM_Hdr8021Filter : CIM_Hdr8021Filter
"This defines whether the action should be to forward or "
"deny traffic meeting the match condition specified in "
"this filter." ),
- ValueMap { "1", "2" },
- Values { "Permit", "Deny" }]
+ ValueMap { "1", "2", "3", "4",
"5" },
+ Values { "Permit", "Deny", "Reject",
"Return", "Continue" }]
uint16 Action;
[Description("This defines whether the Filter is used for input, "
@@ -44,8 +44,8 @@ class KVM_IPHeadersFilter : CIM_IPHeadersFilter
"This defines whether the action should be to forward or "
"deny traffic meeting the match condition specified in "
"this filter." ),
- ValueMap { "1", "2" },
- Values { "Permit", "Deny" }]
+ ValueMap { "1", "2", "3", "4",
"5" },
+ Values { "Permit", "Deny", "Reject",
"Return", "Continue" }]
uint16 Action;
[Description("This defines whether the Filter is used for input, "
diff --git a/src/Virt_FilterEntry.c b/src/Virt_FilterEntry.c
index c058b5e..2ff354a 100644
--- a/src/Virt_FilterEntry.c
+++ b/src/Virt_FilterEntry.c
@@ -202,13 +202,19 @@ int convert_priority(const char *s)
static int convert_action(const char *s)
{
- enum {NONE=0, ACCEPT, DENY} action = NONE;
+ enum {NONE=0, ACCEPT, DENY, REJECT, RETURN, CONTINUE} action = NONE;
if (s != NULL) {
if (STREQC(s, "accept"))
action = ACCEPT;
- else if (STREQC(s, "drop") || STREQC(s, "reject"))
+ else if (STREQC(s, "drop"))
action = DENY;
+ else if (STREQC(s, "reject"))
+ action = REJECT;
+ else if (STREQC(s, "return"))
+ action = RETURN;
+ else if (STREQC(s, "continue"))
+ action = CONTINUE;
}
return action;
}
--
1.7.7.6