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, 29 Jun 2011 07:22:08 -0700
From:	Ben Greear <greearb@...delatech.com>
To:	Michał Mirosław <mirqus@...il.com>
CC:	netdev@...r.kernel.org
Subject: Re: [RFC v2 2/2] e100: Support RXFCS feature flag.

On 06/29/2011 04:37 AM, Michał Mirosław wrote:
> 2011/6/24<greearb@...delatech.com>:
>> From: Ben Greear<greearb@...delatech.com>
>>
>> This allows e100 to be configured to append the
>> Ethernet FCS to the skb.
>>
>> Useful for sniffing networks.
>>
>> Signed-off-by: Ben Greear<greearb@...delatech.com>
>> ---
>> :100644 100644 c1352c6... 761f6f5... M  drivers/net/e100.c
>>   drivers/net/e100.c |   15 ++++++++++++---
>>   1 files changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
>> index c1352c6..761f6f5 100644
>> --- a/drivers/net/e100.c
>> +++ b/drivers/net/e100.c
>> @@ -1089,6 +1089,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
>>   {
>>         struct config *config =&cb->u.config;
>>         u8 *c = (u8 *)config;
>> +       struct net_device *netdev = nic->netdev;
>>
>>         cb->command = cpu_to_le16(cb_config);
>>
>> @@ -1132,6 +1133,9 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
>>                 config->promiscuous_mode = 0x1;         /* 1=on, 0=off */
>>         }
>>
>> +       if (netdev->wanted_features&  NETIF_F_RXFCS)
>> +               config->rx_crc_transfer = 0x1;  /* 1=save, 0=discard */
>> +
>
> You should check netdev->features here.

I thought 'features' was what the NIC could support, and wanted_features
was what the NIC was currently configured to support?  I don't want
to rx the CRC all the time, just when users enable it...

Thanks,
Ben

-- 
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc  http://www.candelatech.com
--
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