Commit 1c28bd59 authored by Hangbin Liu's avatar Hangbin Liu Committed by Stephen Hemminger

iptunnel: Allow GRE_KEY for vti interface

The vti interface will use GRE_KEY to match the right policy in kernel. So we
can not return fail when the tunnel is vti.
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
parent 5e25cf77
...@@ -240,8 +240,9 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p) ...@@ -240,8 +240,9 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
} }
} }
if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) { if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) {
if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) { if (!(p->i_flags & VTI_ISVTI) &&
(p->iph.protocol != IPPROTO_GRE)) {
fprintf(stderr, "Keys are not allowed with ipip and sit tunnels\n"); fprintf(stderr, "Keys are not allowed with ipip and sit tunnels\n");
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment