[rtems-libbsd commit] rc.conf: Fix cloned interface setup.

Christian Mauderer christianm at rtems.org
Mon Aug 6 13:14:46 UTC 2018

Module:    rtems-libbsd
Branch:    master
Commit:    028bf82f6d734b4022af6544c696a52ac2114235
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=028bf82f6d734b4022af6544c696a52ac2114235

Author:    Christian Mauderer <christian.mauderer at embedded-brains.de>
Date:      Thu Aug  2 10:23:15 2018 +0200

rc.conf: Fix cloned interface setup.

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 bedf3bc..23ee15d 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));

More information about the vc mailing list