diff options
author | Bill Marquette <billm@pfsense.org> | 2005-03-15 04:39:58 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-03-15 04:39:58 +0000 |
commit | 80933129da81e0e449f8ee952610543ab0d1f59b (patch) | |
tree | a602f32888bdcf0fd615b0b1ea9e6952a245ba57 /etc | |
parent | ee9f992cae4638476e24655a15fe520a415a1941 (diff) | |
download | pfsense-80933129da81e0e449f8ee952610543ab0d1f59b.zip pfsense-80933129da81e0e449f8ee952610543ab0d1f59b.tar.gz |
static arp entries are interface specific now - no longer tied to only LAN interface
added warning that this will break communications with hosts not in dhcp table
I fully expect we'll want to move this to it's own section at some point
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/services.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 177c783..d236076 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -179,25 +179,25 @@ EOD; return 0; } -function interfaces_staticarp_configure() { +function interfaces_staticarp_configure($if) { global $config, $g; - $lancfg = $config['interfaces']['lan']; + $ifcfg = $config['interfaces'][$if]; /* Enable staticarp, if enabled */ - if(isset($config['staticarp']['enablestaticarp'])) { - mwexec("/sbin/ifconfig " . escapeshellarg($lancfg['if']) . " staticarp " ); + if(isset($config['dhcpd'][$if]['staticarp'])) { + mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " staticarp " ); mwexec("/usr/sbin/arp -ad > /dev/null 2>&1 "); - if (is_array($config['dhcpd']['lan']['staticmap'])) { + if (is_array($config['dhcpd'][$if]['staticmap'])) { - foreach ($config['dhcpd']['lan']['staticmap'] as $arpent) { + foreach ($config['dhcpd'][$if]['staticmap'] as $arpent) { mwexec("/usr/sbin/arp -s " . escapeshellarg($arpent['ipaddr']) . " " . escapeshellarg($arpent['mac'])); } } } else { - mwexec("/sbin/ifconfig " . escapeshellarg($lancfg['if']) . " -staticarp " ); + mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " -staticarp " ); mwexec("/usr/sbin/arp -ad > /dev/null 2>&1 "); } |