Skip to content

Commit

Permalink
ipvs: Allow heterogeneous pools now that we support them
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Gartrell authored and horms committed Sep 17, 2014
1 parent f18ae72 commit bc18d37
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions net/netfilter/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,6 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user_kern *udest,

EnterFunction(2);

/* Temporary for consistency */
if (udest->af != svc->af)
return -EINVAL;

#ifdef CONFIG_IP_VS_IPV6
if (udest->af == AF_INET6) {
atype = ipv6_addr_type(&udest->addr.in6);
Expand Down Expand Up @@ -3403,6 +3399,26 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info)
*/
if (udest.af == 0)
udest.af = svc->af;

if (udest.af != svc->af) {
/* The synchronization protocol is incompatible
* with mixed family services
*/
if (net_ipvs(net)->sync_state) {
ret = -EINVAL;
goto out;
}

/* Which connection types do we support? */
switch (udest.conn_flags) {
case IP_VS_CONN_F_TUNNEL:
/* We are able to forward this */
break;
default:
ret = -EINVAL;
goto out;
}
}
}

switch (cmd) {
Expand Down

0 comments on commit bc18d37

Please sign in to comment.