[U-Boot] [PATCH 0/2] Ethernet name length changes

Joe Hershberger joe.hershberger at ni.com
Thu Aug 2 16:45:27 UTC 2018


On Thu, Aug 2, 2018 at 6:01 AM, Pankaj Bansal <pankaj.bansal at nxp.com> wrote:
> The ethernet name should be within the ETH_NAME_LEN, as this
> is the buffer space allocated to ethernet name.
>
> Otherwise, this causes buffer overflow.
>
> At the same time the 16 char ethernet name size is inadequate to hold the
> name of ethernet "DPMAC17 at rgmii-id", which is a valid name in upcoming
> LX2160AQDS/LX2160ARDB boards.

Can you just shorten the name? This is a shared constant with Linux,
so while we could change it, I'd prefer not to.

> These patches try to solve the above two issues:
> 1. first patch honors the limit imposed by ETH_NAME_LEN on ethernet name
> 2. second patch increases this limit to accommodate the requirements of
>    LX2160AQDS/LX2160ARDB
>
> Cc: Varun Sethi <V.Sethi at nxp.com>
>
> Pankaj Bansal (2):
>   fsl/mc: Limit the ethernet name to ETH_NAME_LEN
>   net: Increase ethernet name string size to 20 chars
>
>  drivers/net/fsl-mc/mc.c           | 6 +++---
>  drivers/net/ldpaa_eth/ldpaa_eth.c | 4 ++--
>  include/net.h                     | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> --
> 2.17.1
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list