--- a/components/dnsmasq/patches/02_compile_dhcp_release.patch Wed Sep 07 09:33:48 2016 -0700
+++ b/components/dnsmasq/patches/02_compile_dhcp_release.patch Wed Sep 07 14:48:21 2016 -0700
@@ -8,8 +8,8 @@
This patch was developed in-house. Since it is Solaris-specific it is not
suitable for upstream.
---- dnsmasq-2.68/Makefile 2013-12-08 07:58:29.000000000 -0800
-+++ NEW/Makefile 2014-07-06 20:06:34.886232993 -0700
+--- dnsmasq-2.75/Makefile.orig 2016-07-11 17:16:44.577976921 -0400
++++ dnsmasq-2.75/Makefile 2016-07-11 17:12:36.902671954 -0400
@@ -19,6 +19,7 @@
# Variables you may well want to override.
@@ -26,31 +26,31 @@
#################################################################
-@@ -67,6 +69,8 @@
- helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o \
- dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o domain.o
+@@ -75,6 +77,8 @@
+ dhcp-common.o outpacket.o radv.o slaac.o auth.o ipset.o \
+ domain.o dnssec.o blockdata.o tables.o loop.o inotify.o poll.o
+dhcp_release_objs = dhcp_release.o
+
hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
- dns-protocol.h radv-protocol.h
+ dns-protocol.h radv-protocol.h ip6addr.h
-@@ -75,11 +79,12 @@
+@@ -83,11 +87,12 @@
top="$(top)" \
- build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags)" \
- build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs)" \
+ build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
+ build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
- -f $(top)/Makefile dnsmasq
+ -f $(top)/Makefile dnsmasq dhcp_release
mostly_clean :
rm -f $(BUILDDIR)/*.mo $(BUILDDIR)/*.pot
-- rm -f $(BUILDDIR)/.configured $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq
-+ rm -f $(BUILDDIR)/.configured $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a \
-+ $(BUILDDIR)/dnsmasq $(BUILDDIR)/dhcp_release
+- rm -f $(BUILDDIR)/.copts_* $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq
++ rm -f $(BUILDDIR)/.copts_* $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq \
++ $(BUILDDIR)/dhcp_release
clean : mostly_clean
rm -f $(BUILDDIR)/dnsmasq_baseline
-@@ -89,9 +94,11 @@
+@@ -97,9 +102,11 @@
install : all install-common
install-common :
@@ -63,36 +63,37 @@
all-i18n : $(BUILDDIR)
@cd $(BUILDDIR) && $(MAKE) \
-@@ -99,7 +106,7 @@
+@@ -107,7 +114,7 @@
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
- build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) `$(PKG_CONFIG) --cflags libidn`" \
- build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) `$(PKG_CONFIG) --libs libidn`" \
+ build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \
+ build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) `$(PKG_CONFIG) --libs libidn`" \
- -f $(top)/Makefile dnsmasq
+ -f $(top)/Makefile dnsmasq dhcp_release
for f in `cd $(PO); echo *.po`; do \
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
done
-@@ -142,12 +149,18 @@
+@@ -150,6 +157,9 @@
$(objs:.o=.c) $(hdrs):
ln -s $(top)/$(SRC)/$@ .
+$(dhcp_release_objs:.o=.c):
+ ln -s $(top)/$(WRT)/$@ .
+
+ $(objs): $(copts_conf) $(hdrs)
+
.c.o:
- $(CC) $(CFLAGS) $(COPTS) $(i18n) $(build_cflags) $(RPM_OPT_FLAGS) -c $<
-
- dnsmasq : .configured $(hdrs) $(objs)
+@@ -158,6 +168,9 @@
+ dnsmasq : $(objs)
$(CC) $(LDFLAGS) -o $@ $(objs) $(build_libs) $(LIBS)
-+dhcp_release : .configured $(hdrs) $(dhcp_release_objs)
++dhcp_release : $(objs) $(dhcp_release_objs)
+ $(CC) $(LDFLAGS) -o $@ $(dhcp_release_objs) $(build_libs) $(LIBS)
+
dnsmasq.pot : $(objs:.o=.c) $(hdrs)
$(XGETTEXT) -d dnsmasq --foreign-user --omit-header --keyword=_ -o $@ -i $(objs:.o=.c)
---- dnsmasq-2.68/contrib/wrt/dhcp_release.c 2013-12-08 07:58:29.000000000 -0800
-+++ NEW/contrib/wrt/dhcp_release.c 2014-07-04 14:57:37.992103839 -0700
+--- dnsmasq-2.75/contrib/wrt/dhcp_release.c.orig 2016-07-11 17:17:15.545272241 -0400
++++ dnsmasq-2.75/contrib/wrt/dhcp_release.c 2016-07-11 17:16:03.110231008 -0400
@@ -33,6 +33,10 @@
The client-id is optional. If it is "*" then it treated as being missing.
*/
@@ -173,13 +174,17 @@
/* This voodoo fakes up a packet coming from the correct interface, which really matters for
a DHCP server */
strcpy(ifr.ifr_name, argv[1]);
-@@ -276,11 +294,43 @@
+@@ -276,6 +294,7 @@
perror("cannot setup interface");
exit(1);
}
--
+#endif
+ if (inet_addr(argv[2]) == INADDR_NONE)
+ {
+@@ -284,8 +303,40 @@
+ }
+
lease.s_addr = inet_addr(argv[2]);
+#ifdef HAVE_SOLARIS_NETWORK
+ struct ifaddrs *ifp_head, *ifp;
@@ -189,7 +194,7 @@
+ perror("could not retrieve IP addresses");
+ exit(1);
+ }
-+ for (ifp = ifp_head; ifp != NULL; ifp = ifp->ifa_next) {
++ for (ifp = ifp_head; ifp != NULL; ifp = ifp->ifa_next) {
+ if (ifp->ifa_addr->sa_family != AF_INET)
+ continue;
+ if (strcmp(ifp->ifa_name, argv[1]) == 0 &&