summaryrefslogtreecommitdiffstats
path: root/xtables.c
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2009-02-12 09:33:59 -0500
committerJan Engelhardt <jengelh@medozas.de>2009-02-12 18:56:45 +0100
commit853322131026d62df3f8d77d67e5c63be496303c (patch)
treed2e7dee1d15300a01d4e1c6837ccda49b1fe0141 /xtables.c
parent617d3d140f4739558dce2ef8ed01aef251cf5487 (diff)
libxtables: add xtables_set_revision
Introduce xtables_set_revision() and make iptables and ip6tables use it. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Diffstat (limited to 'xtables.c')
-rw-r--r--xtables.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xtables.c b/xtables.c
index d85e6390..bc6a65e5 100644
--- a/xtables.c
+++ b/xtables.c
@@ -108,6 +108,14 @@ void xtables_free_opts(int reset_offset, struct option *original_opts)
}
}
+void xtables_set_revision(char *name, u_int8_t revision)
+{
+ /* Old kernel sources don't have ".revision" field,
+ * but we stole a byte from name. */
+ name[XT_FUNCTION_MAXNAMELEN - 2] = '\0';
+ name[XT_FUNCTION_MAXNAMELEN - 1] = revision;
+}
+
/**
* xtables_afinfo - protocol family dependent information
* @kmod: kernel module basename (e.g. "ip_tables")