]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[#80] Corrected unresolved symbol, dhcpv4o6() in relay_unittests under libtool v4_4_2_f1
authorThomas Markwalder <tmark@isc.org>
Tue, 21 Jan 2020 17:40:28 +0000 (12:40 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 21 Jan 2020 17:40:28 +0000 (12:40 -0500)
Removed dummy func defs, reworked #defines to satisfy symbols.

Changes to be committed:
modified:   relay/dhcrelay.c
modified:   relay/tests/relay_unittests.c

relay/dhcrelay.c
relay/tests/relay_unittests.c

index d4ce5f27c9b6df76278880818edcb62ff198dedb..883d5058f2ee5b95ea7a23e6cd4c95b41ff08b9c 100644 (file)
@@ -1433,9 +1433,8 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet,
        return (length);
 }
 
-#ifndef UNIT_TEST
-
 #ifdef DHCPv6
+#ifndef UNIT_TEST
 /*
  * Parse a downstream argument: [address%]interface[#index].
  */
@@ -2020,12 +2019,14 @@ process_down6(struct packet *packet) {
        if (if_id.data != NULL)
                data_string_forget(&if_id, MDL);
 }
+#endif /* UNIT_TEST */
 
 /*
  * Called by the dispatch packet handler with a decoded packet.
  */
 void
 dhcpv6(struct packet *packet) {
+#ifndef UNIT_TEST
        struct stream_list *dp;
 
        /* Try all relay-replies downwards. */
@@ -2048,8 +2049,9 @@ dhcpv6(struct packet *packet) {
 
        log_info("Can't process packet from interface '%s'.",
                 packet->interface->name);
+#endif /* UNIT_TEST */
 }
-#endif
+#endif /* DHCPv6 */
 
 /* Stub routines needed for linking with DHCP libraries. */
 void
@@ -2147,4 +2149,3 @@ void request_v4_interface(const char* name, int flags) {
         interface_snorf(tmp, (INTERFACE_REQUESTED | flags));
         interface_dereference(&tmp, MDL);
 }
-#endif /* UNIT_TEST */
index cba14bd587d5e43ae6268efe5ae635dcf6ef1784..b308393ff9717f4fff4f2f202ab365191ba1298e 100644 (file)
@@ -406,29 +406,3 @@ ATF_TP_ADD_TCS(tp) {
 
     return (atf_no_error());
 }
-
-/* Below are dummy function definitions to satisfy "required" symbols */
-isc_result_t find_class (struct class **c, const char *s,
-                         const char *file, int line) {
-       return 0;
-}
-
-int check_collection (struct packet *packet, struct lease *lease,
-                      struct collection *collection) {
-       return 0;
-}
-
-void classify (struct packet *packet, struct class *class){}
-void bootp(struct packet *packet){}
-void dhcp(struct packet *packet){}
-void dhcpv6(struct packet *packet){}
-
-int parse_allow_deny (struct option_cache **oc, struct parse *cfile,
-                      int flag) {
-    return 0;
-}
-
-isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
-                                     control_object_state_t newstate) {
-    return (ISC_R_SUCCESS);
-}