Messages in this thread | | | Date | Fri, 25 Sep 2020 14:12:34 -0700 (PDT) | Subject | Re: [PATCH net-next v2] net: vlan: Avoid using BUG() in vlan_proto_idx() | From | David Miller <> |
| |
From: Florian Fainelli <f.fainelli@gmail.com> Date: Thu, 24 Sep 2020 17:27:44 -0700
> While we should always make sure that we specify a valid VLAN protocol > to vlan_proto_idx(), killing the machine when an invalid value is > specified is too harsh and not helpful for debugging. All callers are > capable of dealing with an error returned by vlan_proto_idx() so check > the index value and propagate it accordingly. > > Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> > --- > Changes in v2: > - changed signature to return int > - changed message to use ntohs() > - renamed an index variable to 'pidx' instead of 'pdix'
Applied, thanks Florian.
| |