]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: move dns routines into shared
authorNick Owens <nick.owens@coreos.com>
Tue, 2 Jun 2015 18:49:43 +0000 (11:49 -0700)
committerNick Owens <nick.owens@coreos.com>
Wed, 10 Jun 2015 18:15:45 +0000 (11:15 -0700)
12 files changed:
Makefile.am
src/resolve/resolved-bus.c
src/resolve/resolved-dns-answer.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-question.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-zone.c
src/resolve/resolved-manager.c
src/shared/dns-domain.c [moved from src/resolve/resolved-dns-domain.c with 99% similarity]
src/shared/dns-domain.h [moved from src/resolve/resolved-dns-domain.h with 100% similarity]
src/test/test-dns-domain.c [moved from src/resolve/test-dns-domain.c with 99% similarity]

index 5d30d7d51c042eaa02ad1c2a838069ba73af60b7..55bab725f9410dbe07c172dd9d1848ea37fe324f 100644 (file)
@@ -762,6 +762,8 @@ libsystemd_shared_la_SOURCES = \
        src/shared/udev-util.h \
        src/shared/device-nodes.c \
        src/shared/device-nodes.h \
+       src/shared/dns-domain.c \
+       src/shared/dns-domain.h \
        src/shared/util.c \
        src/shared/util.h \
        src/shared/virt.c \
@@ -978,6 +980,7 @@ libsystemd_shared_la_CFLAGS = \
 libsystemd_shared_la_LIBADD = \
        $(SELINUX_LIBS) \
        $(CAP_LIBS) \
+       $(LIBIDN_LIBS) \
        -lm
 
 # -----------------------------------------------------------------------------
@@ -1446,7 +1449,8 @@ tests += \
        test-copy \
        test-cap-list \
        test-sigbus \
-       test-verbs
+       test-verbs \
+       test-dns-domain
 
 EXTRA_DIST += \
        test/a.service \
@@ -1577,6 +1581,15 @@ test_hostname_SOURCES = \
 test_hostname_LDADD = \
        libsystemd-core.la
 
+test_dns_domain_SOURCES = \
+       src/test/test-dns-domain.c
+
+test_dns_domain_LDADD = \
+       libsystemd-network.la \
+       libsystemd-internal.la \
+       libsystemd-shared.la \
+       $(LIBIDN_LIBS)
+
 if ENABLE_EFI
 manual_tests += \
        test-boot-timestamp
@@ -3382,7 +3395,8 @@ test_dhcp_client_SOURCES = \
 test_dhcp_client_LDADD = \
        libsystemd-network.la \
        libsystemd-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       $(LIBIDN_LIBS)
 
 test_dhcp_server_SOURCES = \
        src/libsystemd-network/test-dhcp-server.c
@@ -5405,8 +5419,6 @@ systemd_resolved_SOURCES = \
        src/resolve/resolved-link.h \
        src/resolve/resolved-link.c \
        src/resolve/resolved-def.h \
-       src/resolve/resolved-dns-domain.h \
-       src/resolve/resolved-dns-domain.c \
        src/resolve/resolved-dns-rr.h \
        src/resolve/resolved-dns-rr.c \
        src/resolve/resolved-dns-question.h \
@@ -5476,20 +5488,6 @@ GENERAL_ALIASES += \
 nodist_pkgsysconf_DATA += \
        src/resolve/resolved.conf
 
-tests += \
-       test-dns-domain
-
-test_dns_domain_SOURCES = \
-       src/resolve/resolved-dns-domain.h \
-       src/resolve/resolved-dns-domain.c \
-       src/resolve/test-dns-domain.c
-
-test_dns_domain_LDADD = \
-       libsystemd-network.la \
-       libsystemd-internal.la \
-       libsystemd-shared.la \
-       $(LIBIDN_LIBS)
-
 libnss_resolve_la_SOURCES = \
        src/nss-resolve/nss-resolve.sym \
        src/nss-resolve/nss-resolve.c
@@ -5520,8 +5518,6 @@ systemd_resolve_host_SOURCES = \
        src/resolve/resolved-dns-answer.h \
        src/resolve/resolved-dns-question.c \
        src/resolve/resolved-dns-question.h \
-       src/resolve/resolved-dns-domain.c \
-       src/resolve/resolved-dns-domain.h \
        src/resolve/dns-type.c \
        src/resolve/dns-type.h
 
@@ -5551,7 +5547,8 @@ systemd_networkd_SOURCES = \
        src/network/networkd.c
 
 systemd_networkd_LDADD = \
-       libsystemd-networkd-core.la
+       libsystemd-networkd-core.la \
+       $(LIBIDN_LIBS)
 
 if HAVE_LIBIPTC
 systemd_networkd_LDADD += \
@@ -5650,7 +5647,8 @@ test_network_SOURCES = \
        src/network/test-network.c
 
 test_network_LDADD = \
-       libsystemd-networkd-core.la
+       libsystemd-networkd-core.la \
+       $(LIBIDN_LIBS)
 
 if HAVE_LIBIPTC
 test_network_LDADD += \
index 171141e3a46c32d3bd795a73acff266e447e469f..6db12511f906dc4f882c11259066986672a28e56 100644 (file)
@@ -22,7 +22,7 @@
 #include "bus-common-errors.h"
 #include "bus-util.h"
 
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-bus.h"
 #include "resolved-def.h"
 
index e08eb667cca99011861342cc066b762a35f13736..f77b98e505240686eda20a531c417ccce414a1b5 100644 (file)
@@ -20,7 +20,7 @@
 ***/
 
 #include "resolved-dns-answer.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 
 DnsAnswer *dns_answer_new(unsigned n) {
         DnsAnswer *a;
index 21756f566fb0674b8c6948f07de98a8c6e460acf..bb74b1828e35ed531986b0efa979e1ff30ad1fd3 100644 (file)
@@ -23,7 +23,7 @@
 #include "util.h"
 #include "strv.h"
 #include "unaligned.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-dns-packet.h"
 
 int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
index 45bcbbf23a15f5e2e62ac5996e6f2651826e95f0..4d71f5e3d400385a932ffe3e57db1fff13bec8ed 100644 (file)
@@ -20,7 +20,7 @@
 ***/
 
 #include "resolved-dns-question.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 
 DnsQuestion *dns_question_new(unsigned n) {
         DnsQuestion *q;
index 78d9e4a412471458ab1004be2e96724c76614b9c..c1818eef9c7f2f78dc9a58623933f5760a7683f4 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "strv.h"
 
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-dns-rr.h"
 #include "resolved-dns-packet.h"
 #include "dns-type.h"
index 7369cbf50f5eff638ce165581245660539543632..c25ac2216dcc1df73875edc984ce84dc5cbad951 100644 (file)
@@ -27,7 +27,7 @@
 #include "af-list.h"
 #include "random-util.h"
 #include "hostname-util.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-dns-scope.h"
 
 #define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC)
index a4c9b7d7afad6b1fb64d513c88bb486f5b611c47..32d771a954ce9eedf7df4bbcbb154536c4d11697 100644 (file)
@@ -22,7 +22,7 @@
 #include "list.h"
 
 #include "resolved-dns-zone.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-dns-packet.h"
 
 /* Never allow more than 1K entries */
index 7fc2803ddbf6317cf249235d805891dcdcebd288..f8d4db7aada58080d5168485e485adab83721d59 100644 (file)
@@ -34,7 +34,7 @@
 #include "random-util.h"
 #include "hostname-util.h"
 
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 #include "resolved-conf.h"
 #include "resolved-bus.h"
 #include "resolved-manager.h"
similarity index 99%
rename from src/resolve/resolved-dns-domain.c
rename to src/shared/dns-domain.c
index e1eb3ddfe5a6a7478246f453694bd9f5d663a232..20a44ce4e11bf4ba84ffd6446ad193c095cae370 100644 (file)
@@ -24,7 +24,7 @@
 #include <stringprep.h>
 #endif
 
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 
 int dns_label_unescape(const char **name, char *dest, size_t sz) {
         const char *n;
similarity index 99%
rename from src/resolve/test-dns-domain.c
rename to src/test/test-dns-domain.c
index c3208abc7854ef03ed69659cb3e455e438408254..527cdd3b549bb1d58714f16b2b6edc61fe9d439b 100644 (file)
@@ -20,7 +20,7 @@
  ***/
 
 #include "macro.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
 
 static void test_dns_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret) {
         char buffer[buffer_sz];