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
| ||
|
Date: Mon, 07 Jul 2014 02:36:50 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: Govindarajulu Varadarajan <_govind@....com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: query: ethtool --show-nfc mask interpretation
On Fri, 2014-07-04 at 21:43 +0530, Govindarajulu Varadarajan wrote:
> I was working on ethtool --show-nfc implementation for enic.
>
> While displaying, ethtool displays the 1's compliment of
> ethtool_rx_flow_spec->m_u.tcp_ip4_spec.psrc
The code in ethtool was originally written to work with the n-tuple
ethtool operations (which no longer exist) in which the mask fields
specify bits to be ignored in the packet. For NFC rule operations, the
semantics are the opposite: the mask fields specify bits to be matched
in the packet. So ethtool inverts the mask fields as necessary.
> I could not understand how to interpret the mask output
>
> For eg.
> [root@...3 linux-next]# ethtool -n enp9s0
> 8 RX rings available
> Total 2 rules
>
> Filter: 0
> Rule Type: TCP over IPv4
> Src IP addr: 10.65.79.1 mask: 255.255.0.0
> Dest IP addr: 10.106.186.163 mask: 255.255.255.255
> TOS: 0x0 mask: 0x0
> Src port: 51331 mask: 0xff
> Dest port: 22 mask: 0xffff
> Action: Direct to queue 4
>
>
> The mask for src port is 0x00ff. Does that mean 8 bits in lsb should match and
> the other 8 bits in msb should be ignored? Or is it the other way?
It means the 8 least significant bits are ignored.
Ben.
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists