Skip to contentSkip to conversation

alfred: Keep order of interfaces from commandline

PATCH Applied Sven Eckelmann 2 participants 2 messages Oct 13, 2016 – Oct 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alfred: Keep order of interfaces from commandline

The first (valid) interface mac address will be used as source mac for an dataset. But alfred added the commandline parameters for a multi-interface master in reverse order.

Keep the list in the same order as the commandline to fulfill the user expectations when checking the source entries of datasets.

---
 netsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
netsock.c +1 -1
index d72541e..5d37347 100644
@@ -165,7 +165,7 @@ int netsock_set_interfaces(struct globals *globals, char *interfaces)
 			return -ENOMEM;
 		}
 
-		list_add(&interface->list, &globals->interfaces);
+		list_add_tail(&interface->list, &globals->interfaces);
 	}
 
 	return 0;
#1 lore raw
Quoted 8 lines · CEST Sven Eckelmann

The first (valid) interface mac address will be used as source mac for an dataset. But alfred added the commandline parameters for a multi-interface master in reverse order.

Keep the list in the same order as the commandline to fulfill the user expectations when checking the source entries of datasets.

Applied in revision f21f747

Thanks!
Simon