summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/pnat/pnat_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/pnat/pnat_cli.c')
-rw-r--r--src/plugins/nat/pnat/pnat_cli.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/nat/pnat/pnat_cli.c b/src/plugins/nat/pnat/pnat_cli.c
index 082f0778acb..ce9beee540d 100644
--- a/src/plugins/nat/pnat/pnat_cli.c
+++ b/src/plugins/nat/pnat/pnat_cli.c
@@ -122,6 +122,8 @@ uword unformat_pnat_match_tuple(unformat_input_t *input, va_list *args) {
t->mask |= PNAT_SA;
else if (unformat(input, "dst %U", unformat_ip4_address, &t->dst))
t->mask |= PNAT_DA;
+ else if (unformat(input, "proto %U", unformat_ip_protocol, &t->proto))
+ t->mask |= PNAT_PROTO;
else if (unformat(input, "sport %d", &sport)) {
if (sport == 0 || sport > 65535)
return 0;
@@ -132,9 +134,7 @@ uword unformat_pnat_match_tuple(unformat_input_t *input, va_list *args) {
return 0;
t->mask |= PNAT_DPORT;
t->dport = dport;
- } else if (unformat(input, "proto %U", unformat_ip_protocol, &t->proto))
- ;
- else
+ } else
break;
}
return 1;