diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 8bd65df..b625756 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -39,7 +39,64 @@
 #include "dhcpc.h"
 #include "dhcpd.h"
 
-/* on these functions, make sure your datatype matches */
+/* Takes the address of the pointer to the static_leases linked list,
+ * address to a 6 byte mac address,
+ * 4 byte IP address */
+static void add_static_lease(struct static_lease **st_lease_pp,
+		uint8_t *mac,
+		uint32_t nip)
+{
+	struct static_lease *st_lease;
+
+	/* Find the tail of the list */
+	while ((st_lease = *st_lease_pp) != NULL) {
+		st_lease_pp = &st_lease->next;
+	}
+
+	/* Add new node */
+	*st_lease_pp = st_lease = xzalloc(sizeof(*st_lease));
+	memcpy(st_lease->mac, mac, 6);
+	st_lease->nip = nip;
+	/*st_lease->next = NULL;*/
+}
+
+/* Find static lease IP by mac */
+static uint32_t get_static_nip_by_mac(struct static_lease *st_lease, void *mac)
+{
+	while (st_lease) {
+		if (memcmp(st_lease->mac, mac, 6) == 0)
+			return st_lease->nip;
+		st_lease = st_lease->next;
+	}
+
+	return 0;
+}
+
+#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
+/* Print out static leases just to check what's going on */
+/* Takes the address of the pointer to the static_leases linked list */
+static void log_static_leases(struct static_lease **st_lease_pp)
+{
+	struct static_lease *cur;
+
+	if (dhcp_verbose < 2)
+		return;
+
+	cur = *st_lease_pp;
+	while (cur) {
+		bb_error_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x",
+			cur->mac[0], cur->mac[1], cur->mac[2],
+			cur->mac[3], cur->mac[4], cur->mac[5],
+			cur->nip
+		);
+		cur = cur->next;
+	}
+}
+#else
+# define log_static_leases(st_lease_pp) ((void)0)
+#endif
+
+/* On these functions, make sure your datatype matches */
 static int FAST_FUNC read_str(const char *line, void *arg)
 {
 	char **dest = arg;
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index 08c9e8c..b8d94a7 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -102,20 +102,7 @@
 struct dyn_lease *find_lease_by_nip(uint32_t nip) FAST_FUNC;
 uint32_t find_free_or_expired_nip(const uint8_t *safe_mac, unsigned arpping_ms) FAST_FUNC;
 
-
-/* Config file parser will pass static lease info to this function
- * which will add it to a data structure that can be searched later */
-void add_static_lease(struct static_lease **st_lease_pp, uint8_t *mac, uint32_t nip) FAST_FUNC;
-/* Find static lease IP by mac */
-uint32_t get_static_nip_by_mac(struct static_lease *st_lease, void *arg) FAST_FUNC;
-/* Check to see if an IP is reserved as a static IP */
 int is_nip_reserved(struct static_lease *st_lease, uint32_t nip) FAST_FUNC;
-/* Print out static leases just to check what's going on (debug code) */
-#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
-void log_static_leases(struct static_lease **st_lease_pp) FAST_FUNC;
-#else
-# define log_static_leases(st_lease_pp) ((void)0)
-#endif
 
 POP_SAVED_FUNCTION_VISIBILITY
 
diff --git a/networking/udhcp/static_leases.c b/networking/udhcp/static_leases.c
index b7f9e5c..3be7a52 100644
--- a/networking/udhcp/static_leases.c
+++ b/networking/udhcp/static_leases.c
@@ -9,39 +9,6 @@
 #include "common.h"
 #include "dhcpd.h"
 
-/* Takes the address of the pointer to the static_leases linked list,
- * address to a 6 byte mac address,
- * 4 byte IP address */
-void FAST_FUNC add_static_lease(struct static_lease **st_lease_pp,
-		uint8_t *mac,
-		uint32_t nip)
-{
-	struct static_lease *st_lease;
-
-	/* Find the tail of the list */
-	while ((st_lease = *st_lease_pp) != NULL) {
-		st_lease_pp = &st_lease->next;
-	}
-
-	/* Add new node */
-	*st_lease_pp = st_lease = xzalloc(sizeof(*st_lease));
-	memcpy(st_lease->mac, mac, 6);
-	st_lease->nip = nip;
-	/*st_lease->next = NULL;*/
-}
-
-/* Find static lease IP by mac */
-uint32_t FAST_FUNC get_static_nip_by_mac(struct static_lease *st_lease, void *mac)
-{
-	while (st_lease) {
-		if (memcmp(st_lease->mac, mac, 6) == 0)
-			return st_lease->nip;
-		st_lease = st_lease->next;
-	}
-
-	return 0;
-}
-
 /* Check to see if an IP is reserved as a static IP */
 int FAST_FUNC is_nip_reserved(struct static_lease *st_lease, uint32_t nip)
 {
@@ -53,25 +20,3 @@
 
 	return 0;
 }
-
-#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
-/* Print out static leases just to check what's going on */
-/* Takes the address of the pointer to the static_leases linked list */
-void FAST_FUNC log_static_leases(struct static_lease **st_lease_pp)
-{
-	struct static_lease *cur;
-
-	if (dhcp_verbose < 2)
-		return;
-
-	cur = *st_lease_pp;
-	while (cur) {
-		bb_error_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x",
-			cur->mac[0], cur->mac[1], cur->mac[2],
-			cur->mac[3], cur->mac[4], cur->mac[5],
-			cur->nip
-		);
-		cur = cur->next;
-	}
-}
-#endif
