~arges/ubuntu/quantal/iptables/fix-lp982961

« back to all changes in this revision

Viewing changes to extensions/libipt_realm.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:
1
1
/* Shared library add-on to iptables to add realm matching support. */
 
2
#include <stdbool.h>
2
3
#include <stdio.h>
3
4
#include <netdb.h>
4
5
#include <string.h>
23
24
}
24
25
 
25
26
static const struct option realm_opts[] = {
26
 
        { "realm", 1, NULL, '1' },
27
 
        { .name = NULL }
 
27
        {.name = "realm", .has_arg = true, .val = '1'},
 
28
        XT_GETOPT_TABLEEND,
28
29
};
29
30
 
30
31
struct realmname { 
35
36
};
36
37
 
37
38
/* array of realms from /etc/iproute2/rt_realms */
38
 
static struct realmname *realms = NULL;
 
39
static struct realmname *realms;
39
40
/* 1 if loading failed */
40
 
static int rdberr = 0;
41
 
 
 
41
static int rdberr;
42
42
 
43
43
static void load_realms(void)
44
44
{
157
157
        switch (c) {
158
158
                char *end;
159
159
        case '1':
160
 
                xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
161
 
                end = optarg = argv[optind-1];
 
160
                xtables_check_inverse(optarg, &invert, &optind, 0, argv);
 
161
                end = optarg = optarg;
162
162
                realminfo->id = strtoul(optarg, &end, 0);
163
163
                if (end != optarg && (*end == '/' || *end == '\0')) {
164
164
                        if (*end == '/')