Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
e6e751b0
Commit
e6e751b0
authored
Feb 01, 2016
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make names of ARP script actions consistent.
parent
8de875f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
man/dnsmasq.8
man/dnsmasq.8
+4
-4
src/arp.c
src/arp.c
+1
-1
src/dnsmasq.h
src/dnsmasq.h
+1
-1
src/helper.c
src/helper.c
+3
-3
No files found.
man/dnsmasq.8
View file @
e6e751b0
...
@@ -1552,7 +1552,7 @@ with an "old" event.
...
@@ -1552,7 +1552,7 @@ with an "old" event.
There are four further actions which may appear as the first argument
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
scripts should be written to ignore unknown actions. "init" is
described below in
described below in
.B --leasefile-ro
.B --leasefile-ro
...
@@ -1560,10 +1560,10 @@ The "tftp" action is invoked when a TFTP file transfer completes: the
...
@@ -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
arguments are the file size in bytes, the address to which the file
was sent, and the complete pathname of 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
.B --script-arp
They are are supplied with a MAC address and IP address as arguments. "arp" indicates
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-old
indicates the deletion of same.
the arrival of a new entry in the ARP or neighbour table, and
"arp-del"
indicates the deletion of same.
.TP
.TP
.B --dhcp-luascript=<path>
.B --dhcp-luascript=<path>
...
...
src/arp.c
View file @
e6e751b0
...
@@ -216,7 +216,7 @@ int do_arp_script_run(void)
...
@@ -216,7 +216,7 @@ int do_arp_script_run(void)
{
{
#ifdef HAVE_SCRIPT
#ifdef HAVE_SCRIPT
if
(
option_bool
(
OPT_SCRIPT_ARP
))
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
#endif
arp
=
old
;
arp
=
old
;
old
=
arp
->
next
;
old
=
arp
->
next
;
...
...
src/dnsmasq.h
View file @
e6e751b0
...
@@ -637,7 +637,7 @@ struct frec {
...
@@ -637,7 +637,7 @@ struct frec {
#define ACTION_ADD 4
#define ACTION_ADD 4
#define ACTION_TFTP 5
#define ACTION_TFTP 5
#define ACTION_ARP 6
#define ACTION_ARP 6
#define ACTION_ARP_
OLD
7
#define ACTION_ARP_
DEL
7
#define LEASE_NEW 1
/* newly created */
#define LEASE_NEW 1
/* newly created */
#define LEASE_CHANGED 2
/* modified */
#define LEASE_CHANGED 2
/* modified */
...
...
src/helper.c
View file @
e6e751b0
...
@@ -221,12 +221,12 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
...
@@ -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
)
else
if
(
data
.
action
==
ACTION_ARP
)
{
{
action_str
=
"arp"
;
action_str
=
"arp
-add
"
;
is6
=
(
data
.
flags
!=
AF_INET
);
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
);
is6
=
(
data
.
flags
!=
AF_INET
);
data
.
action
=
ACTION_ARP
;
data
.
action
=
ACTION_ARP
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment