#21608: firwall doesn't start on boot
--------------------------------+------------------------
 Reporter:  James.Bottomlely@…  |      Owner:  developers
     Type:  defect              |     Status:  new
 Priority:  high                |  Milestone:
Component:  packages            |    Version:  Trunk
 Keywords:  boot firewall       |
--------------------------------+------------------------
 The firewall fails to start when invoked from S19firewall on first boot.
 Debugging the init scripts, fw3 fails because it can't connect to ubus.
 Digging deeper, the fw3 ubus connect routine has this:

 bool
 fw3_ubus_connect(void)
 {
         bool status = false;
         uint32_t id;
         struct ubus_context *ctx = ubus_connect(NULL);
         struct blob_buf b = { };

         if (!ctx)
                 goto out;

         if (ubus_lookup_id(ctx, "network.interface", &id))
                 goto out;

         if (ubus_invoke(ctx, id, "dump", NULL, dump_cb, NULL, 500))
                 goto out;


 Meaning the firewall will never come up if the network isn't up.  With the
 start priority of 19 for the firewall and 20 for the network it is
 impossible to satisfy this condition.

 Even moving the network to a start priority of 21 still fails because it
 takes about 2s to get a network.interface dump after starting the network,
 so the 500ms timeout is too short.  Fixing both of these finally allows
 the firewall to start on boot.

--
Ticket URL: <https://dev.openwrt.org/ticket/21608>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to