]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Make names of ARP script actions consistent.
authorSimon Kelley <simon@thekelleys.org.uk>
Mon, 1 Feb 2016 17:59:07 +0000 (17:59 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Mon, 1 Feb 2016 17:59:07 +0000 (17:59 +0000)
man/dnsmasq.8
src/arp.c
src/dnsmasq.h
src/helper.c

index b6fe6b4c0b7b61be1d258eef35103f62e13f4c66..7183265996e097453ed2d727d593e896805bef5f 100644 (file)
@@ -1552,7 +1552,7 @@ with an "old" event.
 
 
 There are four further actions which may appear as the first argument
-to the script, "init", "arp", "arp-old" and "tftp". More may be added in the future, so
+to the script, "init", "arp-add", "arp-del" and "tftp". More may be added in the future, so
 scripts should be written to ignore unknown actions. "init" is
 described below in 
 .B --leasefile-ro
@@ -1560,10 +1560,10 @@ The "tftp" action is invoked when a TFTP file transfer completes: the
 arguments are the file size in bytes, the address to which the file
 was sent, and the complete pathname of the file.
  
-The "arp" and "arp-old" actions are only called if enabled with
+The "arp-add" and "arp-del" actions are only called if enabled with
 .B --script-arp
-They are are supplied with a MAC address and IP address as arguments. "arp" indicates
-the arrival of a new entry in the ARP or neighbour table, and arp-old indicates the deletion of same.
+They are are supplied with a MAC address and IP address as arguments. "arp-add" indicates
+the arrival of a new entry in the ARP or neighbour table, and "arp-del" indicates the deletion of same.
 
 .TP
 .B --dhcp-luascript=<path>
index d837ea3204538c7376692da0a821c9d7e8fc849a..3e347ae5e4be73fd4bee735b0987468c61529b21 100644 (file)
--- a/src/arp.c
+++ b/src/arp.c
@@ -216,7 +216,7 @@ int do_arp_script_run(void)
     {
 #ifdef HAVE_SCRIPT
       if (option_bool(OPT_SCRIPT_ARP))
-       queue_arp(ACTION_ARP_OLD, old->hwaddr, old->hwlen, old->family, &old->addr);
+       queue_arp(ACTION_ARP_DEL, old->hwaddr, old->hwlen, old->family, &old->addr);
 #endif
       arp = old;
       old = arp->next;
index 9d4d6b38ecc75df30d6e014c32945172ac1cc319..549ef55439483664e1683d4fdf432983ee1b35dd 100644 (file)
@@ -637,7 +637,7 @@ struct frec {
 #define ACTION_ADD           4
 #define ACTION_TFTP          5
 #define ACTION_ARP           6
-#define ACTION_ARP_OLD       7
+#define ACTION_ARP_DEL       7
 
 #define LEASE_NEW            1  /* newly created */
 #define LEASE_CHANGED        2  /* modified */
index 6ee21bdd6c42c3d2c5bf9cdfb52711f9bfd0f980..0afee4649c3c8bdd1e369dd134d93d8203b07ed7 100644 (file)
@@ -221,12 +221,12 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
        }
       else if (data.action == ACTION_ARP)
        {
-         action_str = "arp";
+         action_str = "arp-add";
          is6 = (data.flags != AF_INET);
        }
-       else if (data.action == ACTION_ARP_OLD)
+       else if (data.action == ACTION_ARP_DEL)
        {
-         action_str = "arp-old";
+         action_str = "arp-del";
          is6 = (data.flags != AF_INET);
          data.action = ACTION_ARP;
        }