Reorder alfabetically device type matching as they are growing in number
authorGioacchino Mazzurco <gio@eigenlab.org>
Tue, 10 Jun 2014 17:29:14 +0000 (19:29 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 11 Jun 2014 10:22:24 +0000 (12:22 +0200)
Signed-off-by: Gioacchino Mazzurco <gmazzurco89@gmail.com>
config.c

index 515e6467df57e1068eff7914e057f60904667e5a..7720acf03084ca1d3cd79777047f3618cebb61bb 100644 (file)
--- a/config.c
+++ b/config.c
@@ -167,16 +167,16 @@ config_init_devices(void)
 
                type = uci_lookup_option_string(uci_ctx, s, "type");
                if (type) {
-                       if (!strcmp(type, "bridge"))
+                       if (!strcmp(type, "8021ad"))
+                               devtype = &vlandev_device_type;
+                       else if (!strcmp(type, "8021q"))
+                               devtype = &vlandev_device_type;
+                       else if (!strcmp(type, "bridge"))
                                devtype = &bridge_device_type;
-                       else if (!strcmp(type, "tunnel"))
-                               devtype = &tunnel_device_type;
                        else if (!strcmp(type, "macvlan"))
                                devtype = &macvlan_device_type;
-                       else if (!strcmp(type, "8021ad"))
-                               devtype = &vlandev_device_type;
-                       else if (!strcmp(type, "8021q"))
-                               devtype = &vlandev_device_type; 
+                       else if (!strcmp(type, "tunnel"))
+                               devtype = &tunnel_device_type;
                }
 
                if (!devtype)