<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-2022-JP"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi, all.<br>
    <br>
    I met this error a couple of wifidog nodes,<br>
    <br>
    .........<br>
    Apr 18 17:50:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:50:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:50:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:50:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:51:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:51:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:51:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:51:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:52:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:52:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:52:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:52:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:53:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:53:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:53:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:53:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:54:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:54:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:54:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:54:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:55:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:55:55 1970][1080](fw_iptables.c:526) popen(): Cannot allocate
    memory<br>
    Apr 18 17:55:55 Ninjin-Oogoe-monit user.info sysinit: [3][Sat Apr 18
    17:55:55 1970][1080](firewall.c:233) Could not get counters from
    firewall!<br>
    Apr 18 17:56:48 Ninjin-Oogoe-monit user.info sysinit: [2][Sat Apr 18
    17:56:48 1970][1082](safe.c:97) Failed to fork: Cannot allocate
    memory.  Bailing out<br>
    <br>
    Wifidog gateway was down when this error was put out.<br>
    <br>
    Environment is,<br>
    device: Ubiquiti Nanostation2 (atheros ar2315 mips, 4MB flash, 16MB
    ram)<br>
    firmware: OpenWRT backfire_10.03<br>
    <font color="#000000"><span class="Apple-style-span"
        style="border-collapse: separate; color: rgb(0, 0, 0);
        font-family: 'MS PGothic'; font-style: normal; font-variant:
        normal; font-weight: normal; letter-spacing: normal;
        line-height: normal; orphans: 2; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; font-size: medium;"><span
          class="Apple-style-span" style="color: rgb(153, 153, 153);
          font-family: Arial,Helvetica,sans-serif; font-size: 12px;
          line-height: 18px;"></span></span></font>wifidog gateway:
    20090925 (from openwrt feeds package)<br>
    <br>
    I read fw_iptables,c.<br>
    <a
href="https://dev.wifidog.org/browser/trunk/wifidog/src/fw_iptables.c?rev=765">https://dev.wifidog.org/browser/trunk/wifidog/src/fw_iptables.c?rev=765</a><br>
    Debug messages for popen() are written in line 458 and 497. Like
    this,<br>
    <br>
            /* Look for outgoing traffic */<br>
            safe_asprintf(&script, "%s %s", "iptables", "-v -n -x -t
    mangle -L " TABLE_WIFIDOG_OUTGOING);<br>
            iptables_insert_gateway_id(&script);<br>
            output = popen(script, "r");<br>
            free(script);<br>
            if (!output) {<br>
                    debug(LOG_ERR, "popen(): %s", strerror(errno));<br>
                    return -1;<br>
            }<br>
    <br>
    If "output" is false, iptables_fw_counters_update() function seems
    to end without pclese().<br>
    <span class="Apple-style-span" style="border-collapse: separate;
      color: rgb(0, 0, 0); font-family: 'MS PGothic'; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; font-size: medium;"><span
        class="Apple-style-span" style="border-collapse: collapse;
        color: rgb(153, 0, 0); font-family: monospace; font-size: 11px;
        font-weight: bold; text-align: left;"></span></span>Is this OK?<br>
    <br>
    I'm not a skilled programmer, please correct me if I'm wrong.<br>
    <br>
    Thanks in advance,<br>
    <br>
    Kazuki Shimada<br>
    Ninjin-net.com<br>
    <span class="Apple-style-span" style="border-collapse: separate;
      color: rgb(0, 0, 0); font-family: 'MS PGothic'; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; font-size: medium;"><span
        class="Apple-style-span" style="border-collapse: collapse;
        color: rgb(42, 42, 42); font-family: monospace; font-size: 11px;
        text-align: left;"><span class="p"></span></span></span>
  </body>
</html>