Permalink
Browse files

iptables: fix save formatting for libipt_webstr

  • Loading branch information...
John Bacho authored and RMerl committed Oct 30, 2018
1 parent 8abce36 commit f0eacfc6564b2ab6d4e986f72bbc5b857e7e1d05
Showing with 19 additions and 1 deletion.
  1. +19 −1 release/src/router/iptables-1.4.x/extensions/libipt_webstr.c
@@ -196,7 +196,25 @@ webstr_print(const void *ip,
static void
webstr_save(const void *ip, const struct ipt_entry_match *match)
{
printf("--webstr ");
struct ipt_webstr_info *stringinfo = (struct ipt_webstr_info *)match->data;
switch (stringinfo->type) {
case IPT_WEBSTR_HOST:
printf(" --host ");
break;
case IPT_WEBSTR_URL:
printf(" --url ");
break;
case IPT_WEBSTR_CONTENT:
printf(" --content ");
break;
default:
printf(" ERROR ");
break;
}
print_string(((struct ipt_webstr_info *)match->data)->string,
((struct ipt_webstr_info *)match->data)->invert, 0);
}

0 comments on commit f0eacfc

Please sign in to comment.