mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-18 19:41:03 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6acef73052 | ||
|
|
10ae7b50f2 | ||
|
|
831b5ba12b | ||
|
|
0932f9c08b | ||
|
|
397542b213 | ||
|
|
0c38719fe0 |
No files matched your search
@@ -101,7 +101,11 @@ version 2.67
|
|||||||
(provide TFTP to the same interfaces we provide DHCP to)
|
(provide TFTP to the same interfaces we provide DHCP to)
|
||||||
is retained. Thanks to Lonnie Abelbeck for the suggestion.
|
is retained. Thanks to Lonnie Abelbeck for the suggestion.
|
||||||
|
|
||||||
Add --dhcp-relay config option.
|
Add --dhcp-relay config option. Many thanks to vtsl.net
|
||||||
|
for sponsoring this development.
|
||||||
|
|
||||||
|
Fix crash with empty tag: in --dhcp-range. Thanks to
|
||||||
|
Kaspar Schleiser for the bug report.
|
||||||
|
|
||||||
|
|
||||||
version 2.66
|
version 2.66
|
||||||
|
|||||||
Vendored
+1
@@ -1,6 +1,7 @@
|
|||||||
dnsmasq (2.67-1) unstable; urgency=low
|
dnsmasq (2.67-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
|
* Update resolvconf script. (closes: #720732)
|
||||||
|
|
||||||
-- Simon Kelley <simon@thekelleys.org.uk> Wed, 4 Aug 2013 14:53:22 +0000
|
-- Simon Kelley <simon@thekelleys.org.uk> Wed, 4 Aug 2013 14:53:22 +0000
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-8
@@ -16,8 +16,7 @@ set -e
|
|||||||
RUN_DIR="/var/run/dnsmasq"
|
RUN_DIR="/var/run/dnsmasq"
|
||||||
RSLVRLIST_FILE="${RUN_DIR}/resolv.conf"
|
RSLVRLIST_FILE="${RUN_DIR}/resolv.conf"
|
||||||
TMP_FILE="${RSLVRLIST_FILE}_new.$$"
|
TMP_FILE="${RSLVRLIST_FILE}_new.$$"
|
||||||
MY_RECORD_NAME="lo.dnsmasq"
|
MY_NAME_FOR_RESOLVCONF="dnsmasq"
|
||||||
DNSCRYPT_RECORD_NAME="lo.dnscrypt"
|
|
||||||
|
|
||||||
[ -x /usr/sbin/dnsmasq ] || exit 0
|
[ -x /usr/sbin/dnsmasq ] || exit 0
|
||||||
[ -x /lib/resolvconf/list-records ] || exit 1
|
[ -x /lib/resolvconf/list-records ] || exit 1
|
||||||
@@ -46,14 +45,14 @@ if [ ! -d "$RUN_DIR" ] && ! mkdir --parents --mode=0755 "$RUN_DIR" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
RSLVCNFFILES=""
|
RSLVCNFFILES=""
|
||||||
for F in $(/lib/resolvconf/list-records --after "$MY_RECORD_NAME") ; do
|
for F in $(/lib/resolvconf/list-records --after "lo.$MY_NAME_FOR_RESOLVCONF") ; do
|
||||||
case "$F" in
|
case "$F" in
|
||||||
"$MY_RECORD_NAME")
|
"lo.$MY_NAME_FOR_RESOLVCONF")
|
||||||
# Omit
|
# Omit own record
|
||||||
;;
|
;;
|
||||||
"$DNSCRYPT_RECORD_NAME")
|
lo.*)
|
||||||
# Dnscrypt, I only have eyes for you
|
# Include no more records after one for a local nameserver
|
||||||
RSLVCNFFILES="$DNSCRYPT_RECORD_NAME"
|
RSLVCNFFILES="${RSLVCNFFILES:+$RSLVCNFFILES }$F"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
+3
-2
@@ -237,8 +237,9 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
#if defined(HAVE_LINUX_NETWORK) && defined(HAVE_DHCP)
|
#if defined(HAVE_LINUX_NETWORK) && defined(HAVE_DHCP)
|
||||||
/* after enumerate_interfaces() */
|
/* after enumerate_interfaces() */
|
||||||
if (daemon->dhcp || daemon->relay4)
|
if (daemon->dhcp)
|
||||||
{
|
{
|
||||||
|
if (!daemon->relay4)
|
||||||
bindtodevice(daemon->dhcpfd);
|
bindtodevice(daemon->dhcpfd);
|
||||||
if (daemon->enable_pxe)
|
if (daemon->enable_pxe)
|
||||||
bindtodevice(daemon->pxefd);
|
bindtodevice(daemon->pxefd);
|
||||||
@@ -246,7 +247,7 @@ int main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_LINUX_NETWORK) && defined(HAVE_DHCP6)
|
#if defined(HAVE_LINUX_NETWORK) && defined(HAVE_DHCP6)
|
||||||
if (daemon->doing_dhcp6 || daemon->relay6)
|
if (daemon->doing_dhcp6 && !daemon->relay6)
|
||||||
bindtodevice(daemon->dhcp6fd);
|
bindtodevice(daemon->dhcp6fd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -443,7 +443,7 @@ static int iface_allowed_v4(struct in_addr local, int if_index, char *label,
|
|||||||
int enumerate_interfaces(int reset)
|
int enumerate_interfaces(int reset)
|
||||||
{
|
{
|
||||||
static struct addrlist *spare = NULL;
|
static struct addrlist *spare = NULL;
|
||||||
static int done = 0;
|
static int done = 0, active = 0;
|
||||||
struct iface_param param;
|
struct iface_param param;
|
||||||
int errsave, ret = 1;
|
int errsave, ret = 1;
|
||||||
struct addrlist *addr, *tmp;
|
struct addrlist *addr, *tmp;
|
||||||
@@ -458,11 +458,14 @@ int enumerate_interfaces(int reset)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done)
|
if (done || active)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
done = 1;
|
done = 1;
|
||||||
|
|
||||||
|
/* protect against recusive calls from iface_enumerate(); */
|
||||||
|
active = 1;
|
||||||
|
|
||||||
if ((param.fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1)
|
if ((param.fd = socket(PF_INET, SOCK_DGRAM, 0)) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -504,6 +507,7 @@ int enumerate_interfaces(int reset)
|
|||||||
errno = errsave;
|
errno = errsave;
|
||||||
|
|
||||||
spare = param.spare;
|
spare = param.spare;
|
||||||
|
active = 0;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2337,6 +2337,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
struct dhcp_netid *tt = opt_malloc(sizeof (struct dhcp_netid));
|
struct dhcp_netid *tt = opt_malloc(sizeof (struct dhcp_netid));
|
||||||
tt->net = opt_string_alloc(arg+4);
|
tt->net = opt_string_alloc(arg+4);
|
||||||
tt->next = new->filter;
|
tt->next = new->filter;
|
||||||
|
/* ignore empty tag */
|
||||||
|
if (tt->net)
|
||||||
new->filter = tt;
|
new->filter = tt;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user