summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
Diffstat (limited to 'iptables')
-rw-r--r--iptables/ip6tables.c7
-rw-r--r--iptables/iptables.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index b191d5df..752cf033 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,
diff --git a/iptables/iptables.c b/iptables/iptables.c
index 03ac63b8..a237e93c 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)