3 # Contributed by Darren Hoo <darren.hoo@gmail.com>
5 # If you use dnsmasq as DHCP server on a router, you may have
6 # met with attackers trying ARP Poison Routing (APR) on your
7 # local area network. This script will setup a 'permanent' entry
8 # in the router's ARP table upon each DHCP transaction so as to
9 # make the attacker's efforts less successful.
12 # edit /etc/dnsmasq.conf and specify the path of this script
13 # to dhcp-script, for example:
14 # dhcp-script=/usr/sbin/static-arp
16 # if $1 is add or old, update the static arp table entry.
17 # if $1 is del, then delete the entry from the table
18 # if $1 is init which is called by dnsmasq at startup, it's ignored
23 # $1 is action (add, del, old)
26 # $4 is hostname (optional, may be unset)
28 if [ ${1} = del ] ; then
32 if [ ${1} = old ] || [ ${1} = add ] ; then