Commit 1fc957fd authored by Jussi Laakkonen's avatar Jussi Laakkonen

Merge branch 'jb44205_3' into 'master'

[connman] Set ip6t_ip6 flags if IPv6 rule protocol is set. JB#44205

See merge request mer-core/connman!181
parents 0e7dcd0a fc3068b0
......@@ -2959,6 +2959,10 @@ static int parse_xt_modules(int c, bool invert,
ctx->proto = IPPROTO_IPV6;
fw6.ipv6.proto = ctx->proto;
/* Flags must be set for IPv6 if protocol is set. */
fw6.ipv6.flags |= IP6T_F_PROTO;
break;
default:
return 0;
......@@ -3261,8 +3265,15 @@ static int parse_rule_spec(struct connman_iptables *table,
if (ctx->type == AF_INET)
ctx->ip->proto = ctx->proto;
if (ctx->type == AF_INET6)
if (ctx->type == AF_INET6) {
ctx->ipv6->proto = ctx->proto;
/*
* Flags must be set for IPv6 if
* protocol is set.
*/
ctx->ipv6->flags |= IP6T_F_PROTO;
}
}
break;
case 'j':
......
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