[ previous ] [ next ] [ threads ]
 From:  "Adam Wilks" <adam dot wilks at weymouthwireless dot co dot uk>
 To:  "Monowall Mailing List" <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Run function after DHCP WAN assignment?
 Date:  Thu, 21 Oct 2004 15:30:14 +0100
After discussions relating to the X-Modem CE from ADSLNation.com, and
obtaining a public IP on m0n0’s WAN interface, I have been experimenting
with trying to patch m0n0 to fix the routing issue.
As suggested by Chris Buechler, I am finding myself having to execute
two commands after my ISP assigns m0n0wall a DHCP lease. I knocked up a
function containing the commands…
----------- located in xmodem.inc -----------
function xmodem_fix() {
      global $config, $g;
      mwexec("route delete default");
      mwexec("route add default -interface -link rl1");
      return 0;
… and added a line to rc.newwanip to execute my new function. I
discovered that this newwanip script is not called upon DHCP assignment
to the WAN. I believe this to be because I am using PPPoA and a
half-bridge modem, m0n0 is not performing the PPP functions that cause
this script to be executed.
Can anyone tell me where I might execute my function from so that it
will be called after DHCP assignment on the WAN interface?
Thanks in advance,

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 15/10/2004