[brcm63xx] refresh kernel patches
[openwrt.git] / package / iptables / patches / 1.4.0 / 003-layer7_2.17_pktmatch.patch
1 Index: iptables-1.4.0/extensions/libipt_layer7.c
2 ===================================================================
3 --- iptables-1.4.0.orig/extensions/libipt_layer7.c
4 +++ iptables-1.4.0/extensions/libipt_layer7.c
5 @@ -43,7 +43,8 @@ static void help(void)
6 "LAYER7 match v%s options:\n"
7 "--l7dir <directory> : Look for patterns here instead of /etc/l7-protocols/\n"
8 " (--l7dir must be specified before --l7proto if used!)\n"
9 - "--l7proto [!] <name> : Match the protocol defined in /etc/l7-protocols/name.pat\n",
10 + "--l7proto [!] <name> : Match the protocol defined in /etc/l7-protocols/name.pat\n"
11 + "--l7pkt : Skip connection tracking and match individual packets\n",
12 IPTABLES_VERSION);
13 fputc('\n', stdout);
14 }
15 @@ -51,6 +52,7 @@ static void help(void)
16 static struct option opts[] = {
17 { .name = "l7proto", .has_arg = 1, .flag = 0, .val = '1' },
18 { .name = "l7dir", .has_arg = 1, .flag = 0, .val = '2' },
19 + { .name = "l7pkt", .has_arg = 0, .flag = 0, .val = '3' },
20 { .name = 0 }
21 };
22
23 @@ -339,6 +341,10 @@ static int parse(int c, char **argv, int
24 *flags = 1;
25 break;
26
27 + case '3':
28 + layer7info->pkt = 1;
29 + break;
30 +
31 default:
32 return 0;
33 }
34 @@ -370,6 +376,9 @@ static void print(const void *ip,
35
36 print_protocol(((struct xt_layer7_info *)match->data)->protocol,
37 ((struct xt_layer7_info *)match->data)->invert, numeric);
38 +
39 + if (((struct xt_layer7_info *)match->data)->pkt)
40 + printf("l7pkt ");
41 }
42 /* Saves the union ipt_matchinfo in parsable form to stdout. */
43 static void save(const void *ip, const struct xt_entry_match *match)
This page took 0.046742 seconds and 5 git commands to generate.