summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2012-09-30 11:23:04 +0200
committerJan Engelhardt <jengelh@inai.de>2012-09-30 11:23:04 +0200
commitec40b897289745da3d67de2cb14be30353003922 (patch)
tree2b9bb5bf0ced141a8b434712eef54d9f0f06adf6 /iptables
parentd637ead63658d741501974c381889b3857073308 (diff)
parent0d701631625898ac33fb53c67ed2b529668fe0d7 (diff)
Merge branch 'master' of git://git.inai.de/iptables
Diffstat (limited to 'iptables')
-rw-r--r--iptables/ip6tables.c13
-rw-r--r--iptables/iptables.c14
2 files changed, 23 insertions, 4 deletions
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index 7a16b974..36612161 100644
--- a/iptables/ip6tables.c
+++ b/iptables/ip6tables.c
@@ -1286,8 +1286,13 @@ static void command_jump(struct iptables_command_state *cs)
cs->target->t = xtables_calloc(1, size);
cs->target->t->u.target_size = size;
- strcpy(cs->target->t->u.user.name, cs->jumpto);
+ strcpy(cs->target->t->u.user.name, cs->target->real_name);
cs->target->t->u.user.revision = cs->target->revision;
+ if (cs->target->real_name != cs->target->name)
+ fprintf(stderr, "WARNING: The %s target is obsolete. "
+ "Use %s instead.\n",
+ cs->jumpto, cs->target->real_name);
+
xs_init_target(cs->target);
if (cs->target->x6_options != NULL)
opts = xtables_options_xfrm(ip6tables_globals.orig_opts, opts,
@@ -1314,8 +1319,12 @@ static void command_match(struct iptables_command_state *cs)
size = XT_ALIGN(sizeof(struct xt_entry_match)) + m->size;
m->m = xtables_calloc(1, size);
m->m->u.match_size = size;
- strcpy(m->m->u.user.name, m->name);
+ strcpy(m->m->u.user.name, m->real_name);
m->m->u.user.revision = m->revision;
+ if (m->real_name != m->name)
+ fprintf(stderr, "WARNING: The %s match is obsolete. "
+ "Use %s instead.\n", m->name, m->real_name);
+
xs_init_match(m);
if (m == m->next)
return;
diff --git a/iptables/iptables.c b/iptables/iptables.c
index 9e3d696a..e935f651 100644
--- a/iptables/iptables.c
+++ b/iptables/iptables.c
@@ -1295,8 +1295,14 @@ static void command_jump(struct iptables_command_state *cs)
cs->target->t = xtables_calloc(1, size);
cs->target->t->u.target_size = size;
- strcpy(cs->target->t->u.user.name, cs->jumpto);
+ strcpy(cs->target->t->u.user.name, cs->target->real_name);
cs->target->t->u.user.revision = cs->target->revision;
+ if (cs->target->real_name != cs->target->name)
+ /* Alias support for userspace side */
+ fprintf(stderr, "WARNING: The %s target is obsolete. "
+ "Use %s instead.\n",
+ cs->jumpto, cs->target->real_name);
+
xs_init_target(cs->target);
if (cs->target->x6_options != NULL)
@@ -1324,8 +1330,12 @@ static void command_match(struct iptables_command_state *cs)
size = XT_ALIGN(sizeof(struct xt_entry_match)) + m->size;
m->m = xtables_calloc(1, size);
m->m->u.match_size = size;
- strcpy(m->m->u.user.name, m->name);
+ strcpy(m->m->u.user.name, m->real_name);
m->m->u.user.revision = m->revision;
+ if (m->real_name != m->name)
+ fprintf(stderr, "WARNING: The %s match is obsolete. "
+ "Use %s instead.\n", m->name, m->real_name);
+
xs_init_match(m);
if (m == m->next)
return;