- minor shrinkage (~-60)
This commit is contained in:
parent
e29186687b
commit
470dc1d7e2
@ -165,23 +165,23 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
|
|||||||
if (key == ARG_ipip ||
|
if (key == ARG_ipip ||
|
||||||
key == ARG_ip_ip) {
|
key == ARG_ip_ip) {
|
||||||
if (p->iph.protocol && p->iph.protocol != IPPROTO_IPIP) {
|
if (p->iph.protocol && p->iph.protocol != IPPROTO_IPIP) {
|
||||||
bb_error_msg_and_die("you managed to ask for more than one tunnel mode");
|
bb_error_msg_and_die("%s tunnel mode", "you managed to ask for more than one");
|
||||||
}
|
}
|
||||||
p->iph.protocol = IPPROTO_IPIP;
|
p->iph.protocol = IPPROTO_IPIP;
|
||||||
} else if (key == ARG_gre ||
|
} else if (key == ARG_gre ||
|
||||||
key == ARG_gre_ip) {
|
key == ARG_gre_ip) {
|
||||||
if (p->iph.protocol && p->iph.protocol != IPPROTO_GRE) {
|
if (p->iph.protocol && p->iph.protocol != IPPROTO_GRE) {
|
||||||
bb_error_msg_and_die("you managed to ask for more than one tunnel mode");
|
bb_error_msg_and_die("%s tunnel mode", "you managed to ask for more than one");
|
||||||
}
|
}
|
||||||
p->iph.protocol = IPPROTO_GRE;
|
p->iph.protocol = IPPROTO_GRE;
|
||||||
} else if (key == ARG_sit ||
|
} else if (key == ARG_sit ||
|
||||||
key == ARG_ip6_ip) {
|
key == ARG_ip6_ip) {
|
||||||
if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) {
|
if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) {
|
||||||
bb_error_msg_and_die("you managed to ask for more than one tunnel mode");
|
bb_error_msg_and_die("%s tunnel mode", "you managed to ask for more than one");
|
||||||
}
|
}
|
||||||
p->iph.protocol = IPPROTO_IPV6;
|
p->iph.protocol = IPPROTO_IPV6;
|
||||||
} else {
|
} else {
|
||||||
bb_error_msg_and_die("cannot guess tunnel mode");
|
bb_error_msg_and_die("%s tunnel mode", "cannot guess");
|
||||||
}
|
}
|
||||||
} else if (key == ARG_key) {
|
} else if (key == ARG_key) {
|
||||||
unsigned uval;
|
unsigned uval;
|
||||||
@ -192,7 +192,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
|
|||||||
p->i_key = p->o_key = get_addr32(*argv);
|
p->i_key = p->o_key = get_addr32(*argv);
|
||||||
else {
|
else {
|
||||||
if (get_unsigned(&uval, *argv, 0) < 0) {
|
if (get_unsigned(&uval, *argv, 0) < 0) {
|
||||||
bb_error_msg_and_die("invalid value of \"key\"");
|
invarg(*argv, "key");
|
||||||
}
|
}
|
||||||
p->i_key = p->o_key = htonl(uval);
|
p->i_key = p->o_key = htonl(uval);
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
|
|||||||
p->o_key = get_addr32(*argv);
|
p->o_key = get_addr32(*argv);
|
||||||
else {
|
else {
|
||||||
if (get_unsigned(&uval, *argv, 0) < 0) {
|
if (get_unsigned(&uval, *argv, 0) < 0) {
|
||||||
bb_error_msg_and_die("invalid value of \"ikey\"");
|
invarg(*argv, "ikey");
|
||||||
}
|
}
|
||||||
p->i_key = htonl(uval);
|
p->i_key = htonl(uval);
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ static void parse_args(char **argv, int cmd, struct ip_tunnel_parm *p)
|
|||||||
p->o_key = get_addr32(*argv);
|
p->o_key = get_addr32(*argv);
|
||||||
else {
|
else {
|
||||||
if (get_unsigned(&uval, *argv, 0) < 0) {
|
if (get_unsigned(&uval, *argv, 0) < 0) {
|
||||||
bb_error_msg_and_die("invalid value of \"okey\"");
|
invarg(*argv, "okey");
|
||||||
}
|
}
|
||||||
p->o_key = htonl(uval);
|
p->o_key = htonl(uval);
|
||||||
}
|
}
|
||||||
@ -442,7 +442,7 @@ static void do_tunnels_list(struct ip_tunnel_parm *p)
|
|||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/* skip headers */
|
||||||
fgets(buf, sizeof(buf), fp);
|
fgets(buf, sizeof(buf), fp);
|
||||||
fgets(buf, sizeof(buf), fp);
|
fgets(buf, sizeof(buf), fp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user