summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_policy.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-05-12 13:59:38 +0200
committerJan Engelhardt <jengelh@medozas.de>2011-05-12 13:59:38 +0200
commitcdc8e0b252c14a17b47e1c89a2fa4dbac2002473 (patch)
tree75bf224fcb70c86f831a65ea16d0ee34536bb319 /extensions/libxt_policy.c
parentab847dfe38529d2aa67cc8178a54d5b45af11cfa (diff)
libxt_policy: use XTTYPE_PROTOCOL type
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_policy.c')
-rw-r--r--extensions/libxt_policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libxt_policy.c b/extensions/libxt_policy.c
index 7affd1b0..97722d6c 100644
--- a/extensions/libxt_policy.c
+++ b/extensions/libxt_policy.c
@@ -52,7 +52,7 @@ static const struct xt_option_entry policy_opts[] = {
.flags = XTOPT_MULTI | XTOPT_INVERT},
{.name = "tunnel-dst", .id = O_TUNNELDST, .type = XTTYPE_HOSTMASK,
.flags = XTOPT_MULTI | XTOPT_INVERT},
- {.name = "proto", .id = O_PROTO, .type = XTTYPE_STRING,
+ {.name = "proto", .id = O_PROTO, .type = XTTYPE_PROTOCOL,
.flags = XTOPT_MULTI | XTOPT_INVERT},
{.name = "mode", .id = O_MODE, .type = XTTYPE_STRING,
.flags = XTOPT_MULTI | XTOPT_INVERT},
@@ -143,7 +143,7 @@ static void policy_parse(struct xt_option_call *cb)
if (e->match.proto)
xtables_error(PARAMETER_PROBLEM,
"policy match: double --proto option");
- e->proto = xtables_parse_protocol(cb->arg);
+ e->proto = cb->val.protocol;
if (e->proto != IPPROTO_AH && e->proto != IPPROTO_ESP &&
e->proto != IPPROTO_COMP)
xtables_error(PARAMETER_PROBLEM,