[PATCH v2 13/15] rc.conf: Fix cloned interface setup.

Christian Mauderer christian.mauderer at embedded-brains.de
Thu Aug 2 08:55:45 UTC 2018


The cloned interfaces have to be set up befor the interface list is
created. Otherwise it's not possible to configure a cloned interface
with a `ifconfig_gifX` line.
---
 rtemsbsd/rtems/rtems-bsd-rc-conf-net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c b/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
index bedf3bc0..23ee15db 100644
--- a/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
+++ b/rtemsbsd/rtems/rtems-bsd-rc-conf-net.c
@@ -745,13 +745,14 @@ interfaces(rtems_bsd_rc_conf* rc_conf, rtems_bsd_rc_conf_argc_argv* aa)
   struct ifaddrs* ifap;
   bool            dhcp = false;
 
+  show_result("cloned_interfaces", cloned_interfaces(rc_conf, aa));
+
   if (getifaddrs(&ifap) != 0) {
     fprintf(stderr, "error: interfaces: getifaddrs: %s\n", strerror(errno));
     return -1;
   }
 
   list_interfaces("Starting network: ", ifap);
-  show_result("cloned_interfaces", cloned_interfaces(rc_conf, aa));
   show_result("lo0", setup_lo0(rc_conf, ifap));
   show_result("ifaces", setup_interfaces(rc_conf, aa, ifap, &dhcp));
   show_result("vlans", setup_vlans(rc_conf, aa, ifap, &dhcp));
-- 
2.13.7




More information about the devel mailing list