Index: uspace/lib/c/generic/inet/udp.c
===================================================================
--- uspace/lib/c/generic/inet/udp.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/lib/c/generic/inet/udp.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -227,4 +227,20 @@
 }
 
+/** Set UDP association sending messages with no local address
+ *
+ * @param assoc Association
+ * @param flags Flags
+ */
+int udp_assoc_set_nolocal(udp_assoc_t *assoc)
+{
+	async_exch_t *exch;
+
+	exch = async_exchange_begin(assoc->udp->sess);
+	sysarg_t rc = async_req_1_0(exch, UDP_ASSOC_SET_NOLOCAL, assoc->id);
+	async_exchange_end(exch);
+
+	return rc;
+}
+
 /** Send message via UDP association.
  *
Index: uspace/lib/c/include/inet/udp.h
===================================================================
--- uspace/lib/c/include/inet/udp.h	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/lib/c/include/inet/udp.h	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -95,4 +95,5 @@
 extern int udp_assoc_create(udp_t *, inet_ep2_t *, udp_cb_t *, void *,
     udp_assoc_t **);
+extern int udp_assoc_set_nolocal(udp_assoc_t *);
 extern void udp_assoc_destroy(udp_assoc_t *);
 extern int udp_assoc_send_msg(udp_assoc_t *, inet_ep_t *, void *, size_t);
Index: uspace/lib/c/include/ipc/udp.h
===================================================================
--- uspace/lib/c/include/ipc/udp.h	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/lib/c/include/ipc/udp.h	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -42,4 +42,5 @@
 	UDP_ASSOC_CREATE,
 	UDP_ASSOC_DESTROY,
+	UDP_ASSOC_SET_NOLOCAL,
 	UDP_ASSOC_SEND_MSG,
 	UDP_RMSG_INFO,
Index: uspace/srv/net/dhcp/transport.c
===================================================================
--- uspace/srv/net/dhcp/transport.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/dhcp/transport.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -153,4 +153,10 @@
 	}
 
+	rc = udp_assoc_set_nolocal(assoc);
+	if (rc != EOK) {
+		rc = EIO;
+		goto error;
+	}
+
 	dt->udp = udp;
 	dt->assoc = assoc;
Index: uspace/srv/net/dnsrsrv/query.c
===================================================================
--- uspace/srv/net/dnsrsrv/query.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/dnsrsrv/query.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -90,4 +90,5 @@
 	list_append(&question->msg, &msg->question);
 	
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "dns_name_query: send DNS request");
 	dns_message_t *amsg;
 	int rc = dns_request(msg, &amsg);
Index: uspace/srv/net/dnsrsrv/transport.c
===================================================================
--- uspace/srv/net/dnsrsrv/transport.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/dnsrsrv/transport.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -183,4 +183,5 @@
 	void *req_data;
 	size_t req_size;
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "dns_request: Encode dns message");
 	int rc = dns_message_encode(req, &req_data, &req_size);
 	if (rc != EOK)
@@ -194,8 +195,11 @@
 
 	while (ntry < REQ_RETRY_MAX) {
+		log_msg(LOG_DEFAULT, LVL_DEBUG, "dns_request: Send DNS message");
 		rc = udp_assoc_send_msg(transport_assoc, &ep, req_data,
 		    req_size);
-		if (rc != EOK)
+		if (rc != EOK) {
+			log_msg(LOG_DEFAULT, LVL_DEBUG, "Error %d sending message", rc);
 			goto error;
+		}
 
 		treq = treq_create(req);
Index: uspace/srv/net/udp/assoc.c
===================================================================
--- uspace/srv/net/udp/assoc.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/udp/assoc.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -40,4 +40,5 @@
 #include <fibril_synch.h>
 #include <inet/endpoint.h>
+#include <inet/inet.h>
 #include <io/log.h>
 #include <nettl/amap.h>
@@ -261,7 +262,20 @@
 		return EINVAL;
 
+	/* This association has no local address set. Need to determine one. */
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - check no local addr");
+	if (inet_addr_is_any(&epp.local.addr) && !assoc->nolocal) {
+		log_msg(LOG_DEFAULT, LVL_DEBUG, "Determine local address.");
+		rc = inet_get_srcaddr(&epp.remote.addr, 0, &epp.local.addr);
+		if (rc != EOK) {
+			log_msg(LOG_DEFAULT, LVL_DEBUG, "Cannot determine "
+			    "local address.");
+			return EINVAL;
+		}
+	}
+
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_send - check version");
 
-	if (epp.remote.addr.version != epp.local.addr.version)
+	if (!inet_addr_is_any(&epp.local.addr) &&
+	    epp.remote.addr.version != epp.local.addr.version)
 		return EINVAL;
 
Index: uspace/srv/net/udp/service.c
===================================================================
--- uspace/srv/net/udp/service.c	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/udp/service.c	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -270,4 +270,28 @@
 }
 
+/** Set association sending messages with no local address.
+ *
+ * Handle client request to set nolocal flag (with parameters unmarshalled).
+ *
+ * @param client   UDP client
+ * @param assoc_id Association ID
+ * @return EOK on success, ENOENT if no such association is found
+ */
+static int udp_assoc_set_nolocal_impl(udp_client_t *client, sysarg_t assoc_id)
+{
+	udp_cassoc_t *cassoc;
+	int rc;
+
+	rc = udp_cassoc_get(client, assoc_id, &cassoc);
+	if (rc != EOK) {
+		assert(rc == ENOENT);
+		return ENOENT;
+	}
+
+	log_msg(LOG_DEFAULT, LVL_NOTE, "Setting nolocal to true");
+	cassoc->assoc->nolocal = true;
+	return EOK;
+}
+
 /** Send message via association.
  *
@@ -391,4 +415,25 @@
 	assoc_id = IPC_GET_ARG1(*icall);
 	rc = udp_assoc_destroy_impl(client, assoc_id);
+	async_answer_0(iid, rc);
+}
+
+/** Set association with no local address.
+ *
+ * Handle client request to set no local address flag.
+ *
+ * @param client   UDP client
+ * @param iid      Async request ID
+ * @param icall    Async request data
+ */
+static void udp_assoc_set_nolocal_srv(udp_client_t *client, ipc_callid_t iid,
+    ipc_call_t *icall)
+{
+	sysarg_t assoc_id;
+	int rc;
+
+	log_msg(LOG_DEFAULT, LVL_NOTE, "udp_assoc_set_nolocal_srv()");
+
+	assoc_id = IPC_GET_ARG1(*icall);
+	rc = udp_assoc_set_nolocal_impl(client, assoc_id);
 	async_answer_0(iid, rc);
 }
@@ -662,4 +707,7 @@
 			udp_assoc_destroy_srv(&client, callid, &call);
 			break;
+		case UDP_ASSOC_SET_NOLOCAL:
+			udp_assoc_set_nolocal_srv(&client, callid, &call);
+			break;
 		case UDP_ASSOC_SEND_MSG:
 			udp_assoc_send_msg_srv(&client, callid, &call);
Index: uspace/srv/net/udp/udp_type.h
===================================================================
--- uspace/srv/net/udp/udp_type.h	(revision 853802e75734f10344867a7876750b07b208eb51)
+++ uspace/srv/net/udp/udp_type.h	(revision 58e8646e6d8489409029ad1abee82469e38897e1)
@@ -41,4 +41,5 @@
 #include <inet/endpoint.h>
 #include <ipc/loc.h>
+#include <stdbool.h>
 #include <stddef.h>
 #include <inet/addr.h>
@@ -119,4 +120,6 @@
 	/** Receive queue CV. Broadcast when new datagram is inserted */
 	fibril_condvar_t rcv_queue_cv;
+	/** Allow sending messages with no local address */
+	bool nolocal;
 
 	udp_assoc_cb_t *cb;
