tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: if_ethersubr.c: if_ierrors -> if_iqdrops?



On 2021/11/24 3:41, Christos Zoulas wrote:
In article <87b00947-9e9a-f2c1-7c79-d3ba6e41a20a%execsw.org@localhost>,
SAITOH Masanobu  <msaitoh%execsw.org@localhost> wrote:
Hi.

On 2021/11/11 17:32, RVP wrote:
On Wed, 10 Nov 2021, Ryota Ozaki wrote:

Another option may be if_noproto.

  ozaki-r


On Wed, 10 Nov 2021, Havard Eidnes wrote:

which further supports the suggestion to use if_noproto for the
stated condition.


I'll use `if_noproto'. Should've done that from the start--missed
the forest for the trees, me.

I'm still seeing a few error packets after hitting this test:

      894         if (etype <= ETHERMTU + sizeof(struct
ether_header)) {

`etype' here (len by this point) is 8.

In my home's network, some machines send 802.2 LLC packet that the
etype = 6. A few machines also send LLDP packets.

I wrote a patch for better counting:
------------
Better counting for ierrors, iqdrops and noproto in ether_input().

  - Use if_noproto for unknown or unsupported protocols.
  - Use if_ierror for wrong mbuf and oversized frame.

LGTM.

christos


Committed!

--
-----------------------------------------------
                SAITOH Masanobu (msaitoh%execsw.org@localhost
                                 msaitoh%netbsd.org@localhost)


Home | Main Index | Thread Index | Old Index