Re: [PATCH v2 iproute2-next] bridge: add support for L2 multicast groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/20 4:28 PM, Vladimir Oltean wrote:
> @@ -168,9 +176,14 @@ static void print_mdb_entry(FILE *f, int ifindex, const struct br_mdb_entry *e,
>  	print_string(PRINT_ANY, "port", " port %s",
>  		     ll_index_to_name(e->ifindex));
>  
> +	if (af == AF_INET || af == AF_INET6)
> +		addr = inet_ntop(af, grp, abuf, sizeof(abuf));
> +	else
> +		addr = ll_addr_n2a(grp, ETH_ALEN, 0, abuf, sizeof(abuf));
> +

The above can be replaced with a single call to rt_addr_n2a_r.

>  	print_color_string(PRINT_ANY, ifa_family_color(af),
> -			    "grp", " grp %s",
> -			    inet_ntop(af, grp, abuf, sizeof(abuf)));
> +			    "grp", " grp %s", addr);
> +
>  	if (tb && tb[MDBA_MDB_EATTR_SOURCE]) {
>  		src = (const void *)RTA_DATA(tb[MDBA_MDB_EATTR_SOURCE]);
>  		print_color_string(PRINT_ANY, ifa_family_color(af),

I think the rest is ok.



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux