diff options
author | Jan Engelhardt <jengelh@inai.de> | 2012-09-04 05:24:47 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@inai.de> | 2012-09-27 23:36:58 +0200 |
commit | cd2f9bdbb7f9b737e5d640aafeb78bcd8e3a7adf (patch) | |
tree | fb1ab73ce71c44406051d024b2fba40b88dd97b5 /iptables/ip6tables.c | |
parent | 954b76c317f641b7faf33cc26931d45585cc0dea (diff) |
iptables: support for target aliases
This patch allows for target names listed on the command line to be
rewritten to new names and revisions.
As before, we will pick a revision that is supported by the kernel - now
including real_name in the search. This gives us the possibility to test
for many action names.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Diffstat (limited to 'iptables/ip6tables.c')
-rw-r--r-- | iptables/ip6tables.c | 7 |
1 files changed, 6 insertions, 1 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, |