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]
Message-ID: <3367B80B08154D42A3B2BC708B5D41F63CC492C950@EXMAIL.ad.emulex.com>
Date:	Sun, 20 Mar 2011 22:41:30 -0700
From:	<Sathya.Perla@...lex.Com>
To:	<jesse@...ira.com>
CC:	<netdev@...r.kernel.org>
Subject: RE: [PATCH net-next-2.6 2/6] be2net: fix to not drop unfiltered
 vlan pkts

Hi, can you pls clarify what you mean by the "new vlan model" below...

thanks,
-Sathya

-----Original Message-----
From: Jesse Gross [mailto:jesse@...ira.com] 
Sent: Saturday, March 19, 2011 2:05 AM
To: Perla, Sathya
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6 2/6] be2net: fix to not drop unfiltered vlan pkts

On Fri, Mar 18, 2011 at 6:20 AM, Sathya Perla <sathya.perla@...lex.com> wrote:
> When the device is in promiscuous mode, the driver can receive vlan packets
> (tag is always stripped by card) even when there is no vlan configuration.
> Such packets must be sent to the stack and not dropped.
>
> Signed-off-by: Sathya Perla <sathya.perla@...lex.com>
> ---
>  drivers/net/benet/be_main.c |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
> index 97c5167..18c6da4 100644
> --- a/drivers/net/benet/be_main.c
> +++ b/drivers/net/benet/be_main.c
> @@ -1013,15 +1013,10 @@ static void be_rx_compl_process(struct be_adapter *adapter,
>        skb->truesize = skb->len + sizeof(struct sk_buff);
>        skb->protocol = eth_type_trans(skb, adapter->netdev);
>
> -       if (unlikely(rxcp->vlanf)) {
> -               if (!adapter->vlan_grp || adapter->vlans_added == 0) {
> -                       kfree_skb(skb);
> -                       return;
> -               }
> +       if (unlikely(rxcp->vlanf))
>                vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid);

It would be better to use __vlan_hwaccel_put_tag() here - it's
equivalent but at least moves in the right direction.  Under the old
vlan model (which vlan_hwaccel_receive_skb() is left over from)
passing in a NULL vlan group is illegal, so it's inconsistent anyways.

Of course even better would be to fully convert over to the new vlan
model.  A quick skim through the code shows that there might be
similar issue with vlan_gro_frags() as above, so it could help catch
some of that.
--
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