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;
