[PATCH] brctl: Added support for showmacs command

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Sep 16 05:54:27 UTC 2019


On 15 September 2019 18:04:49 CEST, Martin Lewis <martin.lewis.x84 at gmail.com> wrote:
>Signed-off-by: Martin Lewis <martin.lewis.x84 at gmail.com>
>---
>networking/brctl.c | 119
>++++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 100 insertions(+), 19 deletions(-)
>
>diff --git a/networking/brctl.c b/networking/brctl.c
>index 586ca9b..35771a5 100644
>--- a/networking/brctl.c
>+++ b/networking/brctl.c
>@@ -61,10 +61,10 @@
> //usage:     "\n	setbridgeprio BRIDGE PRIO	Set bridge priority"
> //usage:     "\n	setportprio BRIDGE IFACE PRIO	Set port priority"
> //usage:     "\n	setpathcost BRIDGE IFACE COST	Set path cost"
>+//usage:     "\n	showmacs BRIDGE		List mac addrs"
> //usage:	)
> // Not yet implemented:
> //			hairpin BRIDGE IFACE on|off	Hairpin on/off
>-//			showmacs BRIDGE			List mac addrs
> //			showstp	BRIDGE			Show stp info
> 
> #include "libbb.h"
>@@ -196,6 +196,94 @@ static void write_uint(const char *name, const
>char *leaf, unsigned val)
> 		bb_simple_perror_msg_and_die(name);
> 	close(fd);
> }
>+
>+struct __fdb_entry {
>+	uint8_t mac_addr[6];

Infiniband has 20 bytes MAC addresses so this is not accurate.

Thanks,


More information about the busybox mailing list