diff options
| author | Alex Gartrell <agartrell@fb.com> | 2014-09-09 19:40:39 -0400 |
|---|---|---|
| committer | Simon Horman <horms@verge.net.au> | 2014-09-17 19:59:29 -0400 |
| commit | bc18d37f676f76edbb5e0c37def78c704b5fbed0 (patch) | |
| tree | 6da9a81dd94cceb14092385e91c739d8352a511e | |
| parent | f18ae7206eaebfecc2dd8b017b0d6a0950eabf8b (diff) | |
ipvs: Allow heterogeneous pools now that we support them
Remove the temporary consistency check and add a case statement to only
allow ipip mixed dests.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
| -rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 462760eded94..ac7ba689efe7 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
| @@ -854,10 +854,6 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest, | |||
| 854 | 854 | ||
| 855 | EnterFunction(2); | 855 | EnterFunction(2); |
| 856 | 856 | ||
| 857 | /* Temporary for consistency */ | ||
| 858 | if (udest->af != svc->af) | ||
| 859 | return -EINVAL; | ||
| 860 | |||
| 861 | #ifdef CONFIG_IP_VS_IPV6 | 857 | #ifdef CONFIG_IP_VS_IPV6 |
| 862 | if (udest->af == AF_INET6) { | 858 | if (udest->af == AF_INET6) { |
| 863 | atype = ipv6_addr_type(&udest->addr.in6); | 859 | atype = ipv6_addr_type(&udest->addr.in6); |
| @@ -3403,6 +3399,26 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info) | |||
| 3403 | */ | 3399 | */ |
| 3404 | if (udest.af == 0) | 3400 | if (udest.af == 0) |
| 3405 | udest.af = svc->af; | 3401 | udest.af = svc->af; |
| 3402 | |||
| 3403 | if (udest.af != svc->af) { | ||
| 3404 | /* The synchronization protocol is incompatible | ||
| 3405 | * with mixed family services | ||
| 3406 | */ | ||
| 3407 | if (net_ipvs(net)->sync_state) { | ||
| 3408 | ret = -EINVAL; | ||
| 3409 | goto out; | ||
| 3410 | } | ||
| 3411 | |||
| 3412 | /* Which connection types do we support? */ | ||
| 3413 | switch (udest.conn_flags) { | ||
| 3414 | case IP_VS_CONN_F_TUNNEL: | ||
| 3415 | /* We are able to forward this */ | ||
| 3416 | break; | ||
| 3417 | default: | ||
| 3418 | ret = -EINVAL; | ||
| 3419 | goto out; | ||
| 3420 | } | ||
| 3421 | } | ||
| 3406 | } | 3422 | } |
| 3407 | 3423 | ||
| 3408 | switch (cmd) { | 3424 | switch (cmd) { |
