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

Markus Gothe nietzsche at lysator.liu.se
Thu Oct 24 15:18:38 UTC 2019


Not expected and default behavior are two different matters :-), as I am concerned I can see this breaking scripts.

I totally agree with you that is not expected however many things are not expected for tunneling / point-to-point interfaces as well.

//M

Sent from my BlackBerry — the most secure mobile device


	  Original Message  



From: bunk at stusta.de
Sent: 24 October 2019 17:10
To: nietzsche at lysator.liu.se
Cc: busybox at busybox.net
Subject: Re: [PATCH] networking/interface.c: Don't print all-zero addresses for unspec_hwtype


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