~ubuntu-branches/ubuntu/oneiric/iptables/oneiric

« back to all changes in this revision

Viewing changes to ip6tables-multi.c

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge, Lorenzo De Liso, Jamie Strandboge
  • Date: 2010-11-12 15:58:40 UTC
  • mfrom: (5.1.8 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20101112155840-jm07l9o9722h0bvm
Tags: 1.4.10-1ubuntu1
[ Lorenzo De Liso ]
* Merge from debian unstable (LP: #671652), remaining changes:
  - Don't fail to run iptables-save if iptables module isn't loaded.
  - Revert changes between 1.4.1.1-3 and 1.4.1.1-4, thus bringing back
    the howtos.
  - Added linuxdoc-tools to Build-Depends
  - Modified debian/iptables{,-dev}.install to match DM syntax
    (removed debian/tmp)
  - Added -fno-strict-aliasing -Werror switches to regular_CFLAGS
    for catching errors early
  - Removed unused TC_NUM_RULES() and TC_GET_RULE()
* debian/patches/03-compilation-error.patch: updated
* debian/patches/0600-makefile_jedi_handwaving.patch: updated
* Dropped changes:
  - debian/patches/0902-docs-version-reference.diff: modifies files inside
    the debian/ directory and hence is not needed

[ Jamie Strandboge ]
* debian/patches/9000-howtos.patch:
  - combine 0102-howtos.patch and 0103-sgml_errors.patch into this patch
    and apply after the Debian patches for easier maintenance
  - add DEP-3 comments
* debian/patches/9001-build-libipq_pic.la.patch:
  - Build libipq_pic.la with -fPIC
  - add DEP-3 comments
* debian/iptables-dev.install: install lib/*.la in usr/lib
* merge debian/patches/9002-xt_recent-reap.patch:
  - support for the xt_recent filter --reap switch (refreshed and updated)
  - add DEP-3 comments
* debian/patches/9003-compilation-error.patch:
  - renamed 03-compilation-error.patch as 9003-compilation-error.patch
  - apply after Debian patches for easier maintenance
  - add DEP-3 comments
* debian/iptables.doc-base.{nat|packet-filter}: update for 2.6
* Dropped changes:
  - Replaced ipt_DSCP.h by xpt_DSCP.h in ipt_ECN.h and ipt_echn.h (applied
    upstream)
  - 9001-build-libipq_pic.a.patch (using la instead)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
int ip6tables_save_main(int argc, char **argv);
8
8
int ip6tables_restore_main(int argc, char **argv);
9
9
 
10
 
int main(int argc, char **argv) {
11
 
  char *progname;
12
 
 
13
 
  if (argc == 0) {
14
 
    fprintf(stderr, "no argv[0]?");
15
 
    exit(1);
16
 
  } else {
17
 
    progname = basename(argv[0]);
18
 
 
19
 
    if (!strcmp(progname, "ip6tables") ||
20
 
        strcmp(progname, "ip6tables-static") == 0)
21
 
      return ip6tables_main(argc, argv);
22
 
    
23
 
    if (!strcmp(progname, "ip6tables-save"))
24
 
      return ip6tables_save_main(argc, argv);
25
 
    
26
 
    if (!strcmp(progname, "ip6tables-restore"))
27
 
      return ip6tables_restore_main(argc, argv);
28
 
    
29
 
    fprintf(stderr, "ip6tables multi-purpose version: unknown applet name %s\n", progname);
30
 
    exit(1);
31
 
  }
 
10
int main(int argc, char **argv)
 
11
{
 
12
        char *progname;
 
13
 
 
14
        if (argc < 1) {
 
15
                fprintf(stderr, "ERROR: This should not happen.\n");
 
16
                exit(EXIT_FAILURE);
 
17
        }
 
18
 
 
19
        progname = basename(argv[0]);
 
20
        if (strcmp(progname, "ip6tables") == 0)
 
21
                return ip6tables_main(argc, argv);
 
22
        if (strcmp(progname, "ip6tables-save") == 0)
 
23
                return ip6tables_save_main(argc, argv);
 
24
        if (strcmp(progname, "ip6tables-restore") == 0)
 
25
                return ip6tables_restore_main(argc, argv);
 
26
 
 
27
        ++argv;
 
28
        --argc;
 
29
        if (argc < 1) {
 
30
                fprintf(stderr, "ERROR: No subcommand given.\n");
 
31
                exit(EXIT_FAILURE);
 
32
        }
 
33
 
 
34
        progname = basename(argv[0]);
 
35
        if (strcmp(progname, "main") == 0)
 
36
                return ip6tables_main(argc, argv);
 
37
        if (strcmp(progname, "save") == 0)
 
38
                return ip6tables_save_main(argc, argv);
 
39
        if (strcmp(progname, "restore") == 0)
 
40
                return ip6tables_restore_main(argc, argv);
 
41
 
 
42
        fprintf(stderr, "ip6tables multi-purpose version: "
 
43
                "unknown subcommand \"%s\"\n", progname);
 
44
        exit(EXIT_FAILURE);
32
45
}