Magellan Linux

Contents of /trunk/iptables/patches/iptables-1.3.1-grsecurity-1.2.8.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 549 - (show annotations) (download)
Thu Mar 27 11:03:18 2008 UTC (16 years, 1 month ago) by niro
File size: 1387 byte(s)
-rediffed patches and cleand directory weirdyness

1 --- /dev/null 2005-01-06 03:07:43.000000000 -0800
2 +++ extensions/libipt_stealth.c 2005-03-08 22:28:26.875595119 -0800
3 @@ -0,0 +1,64 @@
4 +/* Shared library add-on to iptables to add stealth support.
5 + * Copyright (C) 2002 Brad Spengler <spender@grsecurity.net>
6 + * This netfilter module is licensed under the GNU GPL.
7 + */
8 +
9 +#include <stdio.h>
10 +#include <netdb.h>
11 +#include <stdlib.h>
12 +#include <getopt.h>
13 +#include <iptables.h>
14 +
15 +/* Function which prints out usage message. */
16 +static void
17 +help(void)
18 +{
19 + printf("stealth v%s takes no options\n\n", IPTABLES_VERSION);
20 +}
21 +
22 +static struct option opts[] = {
23 + {0}
24 +};
25 +
26 +/* Initialize the match. */
27 +static void
28 +init(struct ipt_entry_match *m, unsigned int *nfcache)
29 +{
30 + *nfcache |= NFC_UNKNOWN;
31 +}
32 +
33 +static int
34 +parse(int c, char **argv, int invert, unsigned int *flags,
35 + const struct ipt_entry *entry,
36 + unsigned int *nfcache,
37 + struct ipt_entry_match **match)
38 +{
39 + return 0;
40 +}
41 +
42 +static void
43 +final_check(unsigned int flags)
44 +{
45 + return;
46 +}
47 +
48 +static
49 +struct iptables_match stealth = {
50 + .next = NULL,
51 + .name = "stealth",
52 + .version = IPTABLES_VERSION,
53 + .size = IPT_ALIGN(0),
54 + .userspacesize = IPT_ALIGN(0),
55 + .help = &help,
56 + .init = &init,
57 + .parse = &parse,
58 + .final_check = &final_check,
59 + .print = NULL,
60 + .save = NULL,
61 + .extra_opts = opts
62 +};
63 +
64 +void _init(void)
65 +{
66 + register_match(&stealth);
67 +}