~ubuntu-branches/ubuntu/precise/iptables/precise-updates

« back to all changes in this revision

Viewing changes to extensions/libipt_MASQUERADE.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-07-14 15:59:54 UTC
  • mfrom: (5.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090714155954-9039kro8cnh6lb1q
Tags: 1.4.4-1ubuntu1
* Merge from debian unstable, remaining changes: LP: #399211
  - Don't fail to run iptables-save if iptables module isn't loaded.
  - debian/patches/0901-build-libipq_pic.a.patch - Build libipq_pic.a with
    -fPIC. Upstream changed build system and patch modified accordingly.
  - 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)

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
MASQUERADE_print(const void *ip, const struct xt_entry_target *target,
112
112
                 int numeric)
113
113
{
114
 
        struct nf_nat_multi_range *mr
115
 
                = (struct nf_nat_multi_range *)target->data;
116
 
        struct nf_nat_range *r = &mr->range[0];
 
114
        const struct nf_nat_multi_range *mr = (const void *)target->data;
 
115
        const struct nf_nat_range *r = &mr->range[0];
117
116
 
118
117
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
119
118
                printf("masq ports: ");
130
129
static void
131
130
MASQUERADE_save(const void *ip, const struct xt_entry_target *target)
132
131
{
133
 
        struct nf_nat_multi_range *mr
134
 
                = (struct nf_nat_multi_range *)target->data;
135
 
        struct nf_nat_range *r = &mr->range[0];
 
132
        const struct nf_nat_multi_range *mr = (const void *)target->data;
 
133
        const struct nf_nat_range *r = &mr->range[0];
136
134
 
137
135
        if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) {
138
136
                printf("--to-ports %hu", ntohs(r->min.tcp.port));