* [PATCH] ipvs: fix inability to remove a mixed-family RS
@ 2015-02-06 19:32 Alexey Andriyanov
2015-02-06 20:27 ` Julian Anastasov
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Andriyanov @ 2015-02-06 19:32 UTC (permalink / raw)
To: lvs-devel
The current code prevents any operation with a mixed-family dest
unless IP_VS_CONN_F_TUNNEL flag is set. The problem is that it's impossible
for the client to follow this rule, because ip_vs_genl_parse_dest does
not even read the destination conn_flags when cmd = IPVS_CMD_DEL_DEST
(need_full_dest = 0).
Also, not every client can pass this flag when removing a dest. ipvsadm,
for example, does not support the "-i" command line option together with
the "-d" option.
This change disables any checks for mixed-family on IPVS_CMD_DEL_DEST command.
Signed-off-by: Alexey Andriyanov <alan@al-an.info>
---
net/netfilter/ipvs/ip_vs_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index ac7ba68..5b373c3 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -3400,7 +3400,7 @@ 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) {
+ if (udest.af != svc->af && cmd != IPVS_CMD_DEL_DEST) {
/* The synchronization protocol is incompatible
* with mixed family services
*/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ipvs: fix inability to remove a mixed-family RS
2015-02-06 19:32 [PATCH] ipvs: fix inability to remove a mixed-family RS Alexey Andriyanov
@ 2015-02-06 20:27 ` Julian Anastasov
2015-02-09 5:25 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Julian Anastasov @ 2015-02-06 20:27 UTC (permalink / raw)
To: Alexey Andriyanov; +Cc: lvs-devel, Simon Horman, Alex Gartrell
Hello,
On Fri, 6 Feb 2015, Alexey Andriyanov wrote:
> The current code prevents any operation with a mixed-family dest
> unless IP_VS_CONN_F_TUNNEL flag is set. The problem is that it's impossible
> for the client to follow this rule, because ip_vs_genl_parse_dest does
> not even read the destination conn_flags when cmd = IPVS_CMD_DEL_DEST
> (need_full_dest = 0).
>
> Also, not every client can pass this flag when removing a dest. ipvsadm,
> for example, does not support the "-i" command line option together with
> the "-d" option.
>
> This change disables any checks for mixed-family on IPVS_CMD_DEL_DEST command.
>
> Signed-off-by: Alexey Andriyanov <alan@al-an.info>
Good catch.
Fixes: bc18d37f676f ("ipvs: Allow heterogeneous pools now that we support them")
Acked-by: Julian Anastasov <ja@ssi.bg>
Simon, please apply this bug fix.
> ---
> net/netfilter/ipvs/ip_vs_ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> index ac7ba68..5b373c3 100644
> --- a/net/netfilter/ipvs/ip_vs_ctl.c
> +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> @@ -3400,7 +3400,7 @@ 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) {
> + if (udest.af != svc->af && cmd != IPVS_CMD_DEL_DEST) {
> /* The synchronization protocol is incompatible
> * with mixed family services
> */
> --
> 1.7.9.5
>
Regards
--
Julian Anastasov <ja@ssi.bg>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipvs: fix inability to remove a mixed-family RS
2015-02-06 20:27 ` Julian Anastasov
@ 2015-02-09 5:25 ` Simon Horman
0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2015-02-09 5:25 UTC (permalink / raw)
To: Julian Anastasov; +Cc: Alexey Andriyanov, lvs-devel, Alex Gartrell
On Fri, Feb 06, 2015 at 10:27:52PM +0200, Julian Anastasov wrote:
>
> Hello,
>
> On Fri, 6 Feb 2015, Alexey Andriyanov wrote:
>
> > The current code prevents any operation with a mixed-family dest
> > unless IP_VS_CONN_F_TUNNEL flag is set. The problem is that it's impossible
> > for the client to follow this rule, because ip_vs_genl_parse_dest does
> > not even read the destination conn_flags when cmd = IPVS_CMD_DEL_DEST
> > (need_full_dest = 0).
> >
> > Also, not every client can pass this flag when removing a dest. ipvsadm,
> > for example, does not support the "-i" command line option together with
> > the "-d" option.
> >
> > This change disables any checks for mixed-family on IPVS_CMD_DEL_DEST command.
> >
> > Signed-off-by: Alexey Andriyanov <alan@al-an.info>
>
> Good catch.
>
> Fixes: bc18d37f676f ("ipvs: Allow heterogeneous pools now that we support them")
> Acked-by: Julian Anastasov <ja@ssi.bg>
>
> Simon, please apply this bug fix.
Thanks, done.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-09 5:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-06 19:32 [PATCH] ipvs: fix inability to remove a mixed-family RS Alexey Andriyanov
2015-02-06 20:27 ` Julian Anastasov
2015-02-09 5:25 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.