[PATCH] networking/interface.c: Don't print all-zero addresses for unspec_hwtype

Adrian Bunk bunk at stusta.de
Thu Oct 24 14:55:59 UTC 2019


On Thu, Oct 24, 2019 at 04:17:48PM +0200, Markus Gothe wrote:
> But it is an expected behavior, right?

When using a point-to-point protocol without any HWaddr
it is not expected to see a HWaddr printed.

> //M
> 
> From: bunk at stusta.de
> Sent: 24 October 2019 16:03
> To: busybox at busybox.net
> Subject: [PATCH] networking/interface.c: Don't print all-zero addresses for unspec_hwtype
> 
> 
> This is not useful information for raw IP qmi_wwan modems:
> wwan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
> 
> Signed-off-by: Adrian Bunk <bunk at stusta.de>
> ---
> networking/interface.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/networking/interface.c b/networking/interface.c
> index e5e55d8d4..137e534f7 100644
> --- a/networking/interface.c
> +++ b/networking/interface.c
> @@ -673,10 +673,11 @@ static int do_if_fetch(struct interface *ife)
> }
> 
> static const struct hwtype unspec_hwtype = {
> - .name = "unspec",
> - .title = "UNSPEC",
> - .type = -1,
> - .print = UNSPEC_print
> + .name = "unspec",
> + .title = "UNSPEC",
> + .type = -1,
> + .print = UNSPEC_print,
> + .suppress_null_addr = 1,
> };
> 
> static const struct hwtype loop_hwtype = {
> --
> 2.20.1
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox



More information about the busybox mailing list