ip tunnel parameter parsing fix by Jean Wolter <jw5@os.inf.tu-dresden.de>

This commit is contained in:
Denis Vlasenko 2007-10-10 14:43:03 +00:00
parent 724d196c75
commit db60bcf1b7

View File

@ -241,12 +241,12 @@ static void parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
} else if (key == ARG_remote) { } else if (key == ARG_remote) {
NEXT_ARG(); NEXT_ARG();
key = index_in_strings(keywords, *argv); key = index_in_strings(keywords, *argv);
if (key == ARG_any) if (key != ARG_any)
p->iph.daddr = get_addr32(*argv); p->iph.daddr = get_addr32(*argv);
} else if (key == ARG_local) { } else if (key == ARG_local) {
NEXT_ARG(); NEXT_ARG();
key = index_in_strings(keywords, *argv); key = index_in_strings(keywords, *argv);
if (key == ARG_any) if (key != ARG_any)
p->iph.saddr = get_addr32(*argv); p->iph.saddr = get_addr32(*argv);
} else if (key == ARG_dev) { } else if (key == ARG_dev) {
NEXT_ARG(); NEXT_ARG();