Skip to content

Commit

Permalink
import of dnsmasq-2.57.tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkelley committed Jan 5, 2012
1 parent 28866e9 commit 572b41e
Show file tree
Hide file tree
Showing 27 changed files with 2,097 additions and 1,759 deletions.
3 changes: 3 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ifneq ($(TARGET_SIMULATOR),true)
include $(call all-subdir-makefiles)
endif
32 changes: 29 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
version 2.57
Add patches to allow build under Android.

Provide our own header for the DNS protocol, rather than
relying on arpa/nameser.h. This has proved more or less
defective over the years and the final straw is that it's
effectively empty on Android.

Fix regression in 2.56 which caused hex constants in
configuration to be rejected if they contain the '*'
wildcard.

Correct wrong casts of arguments to ctype.h functions,
isdigit(), isxdigit() etc. Thanks to Matthias Andree for
spotting this.

Allow build with IDN support independently from i18n.
IDN support continues to be included automatically
when i18n is included.
'make COPTS=-DHAVE_IDN' is the magic incantation.

Modify check on extraneous command line junk (added in
2.56) so that it doesn't complain about extra _empty_
arguments. Otherwise this breaks libvirt.


version 2.56
Add a patch to allow dnsmasq to get interface names right in a
Solaris zone. Thanks to Dj Padzensky for this.
Expand Down Expand Up @@ -117,9 +143,9 @@ version 2.56
request meant for another DHCP server. NAKing this is
wrong. Thanks to Brad D'Hondt for assistance with this.

Fix cosmetic bug which produced strange output when
dumping cache statistics with some configurations. Thanks
to Fedor Kozhevnikov for spotting this.
Fix cosmetic bug which produced strange output when
dumping cache statistics with some configurations. Thanks
to Fedor Kozhevnikov for spotting this.


version 2.55
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dnsmasq is Copyright (c) 2000-2010 Simon Kelley
# dnsmasq is Copyright (c) 2000-2011 Simon Kelley
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@ MAN = man

DNSMASQ_CFLAGS=`echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --cflags dbus-1`
DNSMASQ_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1`
IDN_CFLAGS=`echo $(COPTS) | ../bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn`
IDN_LIBS= `echo $(COPTS) | ../bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn`
SUNOS_LIBS= `if uname | grep SunOS 2>&1 >/dev/null; then echo -lsocket -lnsl -lposix4; fi`

OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \
Expand All @@ -42,8 +44,8 @@ OBJS = cache.o rfc1035.o util.o option.o forward.o network.o \

all :
@cd $(SRC) && $(MAKE) \
BUILD_CFLAGS="$(DNSMASQ_CFLAGS)" \
BUILD_LIBS="$(DNSMASQ_LIBS) $(SUNOS_LIBS)" \
BUILD_CFLAGS="$(DNSMASQ_CFLAGS) $(IDN_CFLAGS)" \
BUILD_LIBS="$(DNSMASQ_LIBS) $(IDN_LIBS) $(SUNOS_LIBS)" \
-f ../Makefile dnsmasq

clean :
Expand Down
18 changes: 18 additions & 0 deletions bld/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
LOCAL_PATH := external/dnsmasq/src

#########################

include $(CLEAR_VARS)
LOCAL_SRC_FILES := bpf.c cache.c dbus.c dhcp.c dnsmasq.c \
forward.c helper.c lease.c log.c \
netlink.c network.c option.c rfc1035.c \
rfc2131.c tftp.c util.c

LOCAL_MODULE := dnsmasq

LOCAL_C_INCLUDES := external/dnsmasq/src

LOCAL_CFLAGS := -O2 -g -W -Wall -D__ANDROID__ -DNO_IPV6 -DNO_TFTP -DNO_SCRIPT
LOCAL_SYSTEM_SHARED_LIBRARIES := libc libcutils

include $(BUILD_EXECUTABLE)
7 changes: 4 additions & 3 deletions dnsmasq.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# necessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link necessarily.
# unnecessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link unnecessarily.

# Never forward plain names (without a dot or domain part)
#domain-needed
Expand Down Expand Up @@ -161,7 +161,8 @@
# of valid alternatives, so we will give examples of each. Note that
# IP addresses DO NOT have to be in the range given above, they just
# need to be on the same network. The order of the parameters in these
# do not matter, it's permissible to give name,address and MAC in any order
# do not matter, it's permissible to give name, address and MAC in any
# order.

# Always allocate the host with Ethernet address 11:22:33:44:55:66
# The IP address 192.168.0.60
Expand Down
Loading

0 comments on commit 572b41e

Please sign in to comment.