Skip to contentSkip to conversation

Correct iptables-save output of osf module

PATCH Daniel De Graaf 3 participants 3 messages Mar 25, 2006 – Mar 29, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

This adds the optional flags for the osf module to the iptables-save output.

- Daniel De Graaf

libipt_osf.c (working copy) renamed from libipt_osf.c (revision 6557) +0 -0
Index: extensions/libipt_osf.c
===================================================================
@@ -134,6 +134,14 @@
        const struct ipt_osf_info *info = (const struct ipt_osf_info*)

match->data;

        printf("--genre %s%s ", (info->invert) ? "! ": "", info->genre);

+ if (info->flags & IPT_OSF_SMART)
+ printf("--smart ");
+ if (info->flags & IPT_OSF_LOG)
+ printf("--log %d ", info->loglevel);
+ if (info->flags & IPT_OSF_NETLINK)
+ printf("--netlink ");
+ if (info->flags & IPT_OSF_CONNECTOR)
+ printf("--connector ");
}

#1 lore raw
Quoted 1 line · Daniel De Graaf

This adds the optional flags for the osf module to the iptables-save output.

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

I can't apply this since my mail client saves it base64 encoded. Please resend as plain text.

#2 lore raw
Quoted 5 lines · Patrick McHardy
Quoted 2 lines · Daniel De Graaf

This adds the optional flags for the osf module to the iptables-save output.

Quoted 7 lines

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

I can't apply this since my mail client saves it base64 encoded. Please resend as plain text.

Sorry, I'll use a real mail client to send patches from now on. Here's the patch again:

libipt_osf.c (working copy) renamed from libipt_osf.c (revision 6560) +8 -0
Index: extensions/libipt_osf.c
===================================================================
@@ -134,6 +134,14 @@
        const struct ipt_osf_info *info = (const struct ipt_osf_info*) match->data;
 
        printf("--genre %s%s ", (info->invert) ? "! ": "", info->genre);
+       if (info->flags & IPT_OSF_SMART)
+               printf("--smart ");
+       if (info->flags & IPT_OSF_LOG)
+               printf("--log %d ", info->loglevel);
+       if (info->flags & IPT_OSF_NETLINK)
+               printf("--netlink ");
+       if (info->flags & IPT_OSF_CONNECTOR)
+               printf("--connector ");
 }