From: Willem de Bruijn <willemdebruijn.ker...@gmail.com> Date: Fri, 26 Feb 2016 12:33:13 -0500
> Right. The simplest, if hacky, fix is to add something along the lines of > > static unsigned short netdev_min_hard_header_len(struct net_device *dev) > { > if (unlikely(dev->type ==ARPHDR_AX25)) > return AX25_KISS_HEADER_LEN; > else > return dev->hard_header_len; > } > > Depending on how the variable encoding scheme works, a basic min > length check may still produce buggy headers that confuse the stack or > driver. I need to read up on AX25. If so, then extending header_ops > with an optional validate() function is a more generic approach of > checking header sanity. I suspect we will need some kind of header ops for this.