lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 11 Oct 2016 15:17:20 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>
Cc:     davem@...emloft.net, nikolay@...ulusnetworks.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bridge: add address and vlan to fdb warning
 messages

On Tue, 11 Oct 2016 14:33:51 -0700
Roopa Prabhu <roopa@...ulusnetworks.com> wrote:

> From: Roopa Prabhu <roopa@...ulusnetworks.com>
> 
> This patch adds vlan and address to warning messages printed
> in the bridge fdb code for debuggability.
> 
> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
> ---
>  net/bridge/br_fdb.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
> index 6b43c8c..1257a88 100644
> --- a/net/bridge/br_fdb.c
> +++ b/net/bridge/br_fdb.c
> @@ -536,8 +536,8 @@ static int fdb_insert(struct net_bridge *br, struct net_bridge_port *source,
>  		if (fdb->is_local)
>  			return 0;
>  		br_warn(br, "adding interface %s with same address "
> -		       "as a received packet\n",
> -		       source ? source->dev->name : br->dev->name);
> +		       "as a received packet (addr:%pM, vlan:%d)\n",
> +		       source ? source->dev->name : br->dev->name, addr, vid);
>  		fdb_delete(br, fdb);
>  	}
>  
> @@ -583,9 +583,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
>  		/* attempt to update an entry for a local interface */
>  		if (unlikely(fdb->is_local)) {
>  			if (net_ratelimit())
> -				br_warn(br, "received packet on %s with "
> -					"own address as source address\n",
> -					source->dev->name);
> +				br_warn(br, "received packet on %s with own "
> +					"address as source address "
> +					"(addr:%pM, vlan:%d)\n",
> +					source->dev->name, addr, vid);
>  		} else {

Isn't vlan unsigned here so print with %u
Also it would be good to make string format on one line to allow for easy search of source.
				br_warn(br,
					"received packet on %s with own address %pM vlan %u",
					source->dev->name, addr, vid);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ