[PATCH] Adds patch for odhcp to not announce itself as DNS-server

Tobias Klaus tk+ff at meskal.net
Di Jan 19 12:42:01 CET 2016


Signed-off-by: Tobias Klaus <tk+ff at meskal.net>
---
 ...ting-dns-via-dhcp-if-no-servers-are-given.patch | 52 ++++++++++++++++++++++
 buildscript                                        |  3 ++
 2 files changed, 55 insertions(+)
 create mode 100644 build_patches/0001-disable-setting-dns-via-dhcp-if-no-servers-are-given.patch

diff --git a/build_patches/0001-disable-setting-dns-via-dhcp-if-no-servers-are-given.patch b/build_patches/0001-disable-setting-dns-via-dhcp-if-no-servers-are-given.patch
new file mode 100644
index 0000000..ae6c2a1
--- /dev/null
+++ b/build_patches/0001-disable-setting-dns-via-dhcp-if-no-servers-are-given.patch
@@ -0,0 +1,52 @@
+From 64b65498b04f14dd005c134ae67fd69f60baef82 Mon Sep 17 00:00:00 2001
+From: Tobias Klaus <klaus at cs.fau.de>
+Date: Tue, 19 Jan 2016 12:13:37 +0100
+Subject: [PATCH] disable setting dns via dhcp if no servers are given
+
+---
+ ...ot-send-DNS-Servers-if-none-is-configured.patch | 33 ++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+ create mode 100644 package/network/services/odhcpd/patches/0001-Do-not-send-DNS-Servers-if-none-is-configured.patch
+
+diff --git a/package/network/services/odhcpd/patches/0001-Do-not-send-DNS-Servers-if-none-is-configured.patch b/package/network/services/odhcpd/patches/0001-Do-not-send-DNS-Servers-if-none-is-configured.patch
+new file mode 100644
+index 0000000..d458569
+--- /dev/null
++++ b/package/network/services/odhcpd/patches/0001-Do-not-send-DNS-Servers-if-none-is-configured.patch
+@@ -0,0 +1,33 @@
++From 59df02650ccbeb72712cb6ffb9487ca16ad5bcc7 Mon Sep 17 00:00:00 2001
++From: Tobias Klaus <klaus at cs.fau.de>
++Date: Tue, 19 Jan 2016 12:05:02 +0100
++Subject: [PATCH] Do not send DNS-Servers if none is configured
++
++---
++ src/dhcpv6.c | 8 +-------
++ 1 file changed, 1 insertion(+), 7 deletions(-)
++
++diff --git a/src/dhcpv6.c b/src/dhcpv6.c
++index 9f91162..41491d5 100644
++--- a/src/dhcpv6.c
+++++ b/src/dhcpv6.c
++@@ -224,15 +224,9 @@ static void handle_client_request(void *addr, void *data, size_t len,
++ 	} refresh = {htons(DHCPV6_OPT_INFO_REFRESH), htons(sizeof(uint32_t)),
++ 			htonl(600)};
++ 
++-	struct in6_addr dns_addr, *dns_addr_ptr = iface->dns;
+++	struct in6_addr *dns_addr_ptr = iface->dns;
++ 	size_t dns_cnt = iface->dns_cnt;
++ 
++-	if ((dns_cnt == 0) &&
++-		!odhcpd_get_linklocal_interface_address(iface->ifindex, &dns_addr)) {
++-		dns_addr_ptr = &dns_addr;
++-		dns_cnt = 1;
++-	}
++-
++ 	struct {
++ 		uint16_t type;
++ 		uint16_t len;
++-- 
++2.7.0
++
+-- 
+2.7.0
+
diff --git a/buildscript b/buildscript
index 508e6ec..41c92d3 100755
--- a/buildscript
+++ b/buildscript
@@ -162,6 +162,9 @@ prepare() {
     # set default password to 'ffol'
     patch -p0 -d "$target" -i "$PWD"/build_patches/set_root_password.patch
 
+    # fixes odhcpd
+    patch -p0 -d "$target" -i "$PWD"/build_patches/0001-disable-setting-dns-via-dhcp-if-no-servers-are-given.patch
+
     #saves ~200MB for each build
     test -d ./src/dl || mkdir ./src/dl
     ln -s ../../src/dl "$target"/dl
-- 
2.7.0




Mehr Informationen über die Mailingliste franken-dev