+ } else if (!strcmp(str, "ipip6")) {
+ struct ip6_tnl_parm p = {
+ .link = link,
+ .proto = IPPROTO_IPIP,
+ .hop_limit = (ttl) ? ttl : 64,
+ .encap_limit = 4,
+ };
+
+ if ((cur = tb[TUNNEL_ATTR_LOCAL]) &&
+ inet_pton(AF_INET6, blobmsg_data(cur), &p.laddr) < 1)
+ return -EINVAL;
+
+ if ((cur = tb[TUNNEL_ATTR_REMOTE]) &&
+ inet_pton(AF_INET6, blobmsg_data(cur), &p.raddr) < 1)
+ return -EINVAL;
+
+ strncpy(p.name, name, sizeof(p.name));
+ if (tunnel_ioctl("ip6tnl0", SIOCADDTUNNEL, &p) < 0)
+ return -1;
+ } else
+ return -EINVAL;