lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Sep 2014 14:56:28 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	David Miller <davem@...emloft.net>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>,
	netdev <netdev@...r.kernel.org>,
	Samuel Gauthier <samuel.gauthier@...nd.com>
Subject: Re: [PATCH net] openvswitch: restore OVS_FLOW_CMD_NEW notifications

On Wed, Sep 17, 2014 at 9:13 AM, Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
> From: Samuel Gauthier <samuel.gauthier@...nd.com>
>
> Since commit fb5d1e9e127a ("openvswitch: Build flow cmd netlink reply only if needed."),
> the new flows are not notified to the listeners of OVS_FLOW_MCGROUP.
>
> This commit fixes the problem by checking that there are listeners in
> the actual OVS_FLOW_MCGROUP group, instead of 0.
>

right, this is bug. group id should be one.

> Signed-off-by: Samuel Gauthier <samuel.gauthier@...nd.com>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> ---
>  net/openvswitch/datapath.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index 91d66b7e64ac..8396f6063343 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -79,10 +79,10 @@ static const struct genl_multicast_group ovs_dp_vport_multicast_group = {
>  /* Check if need to build a reply message.
>   * OVS userspace sets the NLM_F_ECHO flag if it needs the reply. */
>  static bool ovs_must_notify(struct genl_info *info,
> -                           const struct genl_multicast_group *grp)
> +                           unsigned int group)
>  {
>         return info->nlhdr->nlmsg_flags & NLM_F_ECHO ||
> -               netlink_has_listeners(genl_info_net(info)->genl_sock, 0);
> +               netlink_has_listeners(genl_info_net(info)->genl_sock, group);
>  }
>
>  static void ovs_notify(struct genl_family *family,
> @@ -763,7 +763,7 @@ static struct sk_buff *ovs_flow_cmd_alloc_info(const struct sw_flow_actions *act
>  {
>         struct sk_buff *skb;
>
> -       if (!always && !ovs_must_notify(info, &ovs_dp_flow_multicast_group))
> +       if (!always && !ovs_must_notify(info, dp_flow_genl_family.mcgrp_offset))
>                 return NULL;
>


I do not think mcgrp_offset is right group id. It is starting offset
of groups in a family and it is marked as private member of genl
module.
Rather we can just define enum for ovs_dp_flow_multicast_group and
directly use that as group-id.


>         skb = genlmsg_new_unicast(ovs_flow_cmd_msg_size(acts), info, GFP_KERNEL);
> --
> 2.1.0
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ