Index: libfdcore/endpoints.c
===================================================================
--- libfdcore/endpoints.c	(revision 1127)
+++ libfdcore/endpoints.c	(revision 1136)
@@ -203,83 +203,4 @@
 }
 
-/* Remove any endpoint from the exclude list in the list */
-int fd_ep_filter_list( struct fd_list * list, struct fd_list * exclude_list )
-{
-	struct fd_list * li_out, *li_ex, *li;
-	struct fd_endpoint * out, * ex;
-	
-	TRACE_ENTRY("%p %p", list, exclude_list);
-	CHECK_PARAMS(list && exclude_list);
-	
-	/* initialize. Both lists are ordered */
-	li_out = list->next;
-	li_ex = exclude_list->next;
-	
-	/* Now browse both lists in parallel */
-	while ((li_out != list) && (li_ex != exclude_list)) {
-		int cmp;
-		in_port_t * port_out, *port_ex;
-		
-		out = (struct fd_endpoint *)li_out;
-		ex = (struct fd_endpoint *)li_ex;
-
-		/* Compare the next elements families */
-		if (out->sa.sa_family < ex->sa.sa_family) {
-			li_out = li_out->next;
-			continue;
-		}
-		if (out->sa.sa_family > ex->sa.sa_family) {
-			li_ex = li_ex->next;
-			continue;
-		}
-
-		/* Then compare the address fields */
-		switch (out->sa.sa_family) {
-			case AF_INET:
-				cmp = memcmp(&out->sin.sin_addr, &ex->sin.sin_addr, sizeof(struct in_addr));
-				port_out = &out->sin.sin_port;
-				port_ex = &ex->sin.sin_port;
-				break;
-			case AF_INET6:
-				cmp = memcmp(&out->sin6.sin6_addr, &ex->sin6.sin6_addr, sizeof(struct in6_addr));
-				port_out = &out->sin6.sin6_port;
-				port_ex = &ex->sin6.sin6_port;
-				break;
-			default:
-				/* Filter this out */
-				cmp = 0;
-		}
-		if (cmp < 0) {
-			li_out = li_out->next;
-			continue;
-		}
-		if (cmp > 0) {
-			li_ex = li_ex->next;
-			continue;
-		}
-		
-		if (port_out && (*port_out != 0) && (*port_ex != 0)) {
-			if (*port_out < *port_ex) {
-				li_out = li_out->next;
-				continue;
-			}
-			if (*port_out > *port_ex) {
-				li_ex = li_ex->next;
-				continue;
-			}
-		}
-	
-		/* We remove this element then loop */
-		li = li_out;
-		li_out = li->next;
-		fd_list_unlink(li);
-		free(li);
-	}
-	
-	return 0;
-
-}
-
-
 /* Reset the given flag(s) from all items in the list */
 int fd_ep_clearflags( struct fd_list * list, uint32_t flags )
Index: libfdcore/p_cnx.c
===================================================================
--- libfdcore/p_cnx.c	(revision 1103)
+++ libfdcore/p_cnx.c	(revision 1136)
@@ -121,7 +121,4 @@
 	}
 	
-	/* Remove any local address that would be here, it should not happen but it does sometimes... */
-	CHECK_FCT( fd_ep_filter_list(&peer->p_hdr.info.pi_endpoints, &fd_g_config->cnf_endpoints) );
-	
 	/* Now check we have at least one address to attempt */
 	if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) {
Index: libfdcore/server.c
===================================================================
--- libfdcore/server.c	(revision 1122)
+++ libfdcore/server.c	(revision 1136)
@@ -342,6 +342,4 @@
 	int empty_conf_ep = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints);
 	
-	struct fd_list filter_list = FD_LIST_INITIALIZER(filter_list);
-	
 	/* SCTP */
 	if (!fd_g_config->cnf_flags.no_sctp) {
@@ -449,31 +447,4 @@
 	}
 	
-	/* we will filter this list and create endpoints with port information */
-	#ifdef ADDRESS_AVP_INCLUDE_PORT
-	fd_list_move_end(&filter_list, &fd_g_config->cnf_endpoints);
-	while (!FD_IS_LIST_EMPTY(&filter_list)) {
-		struct fd_endpoint * ep = (struct fd_endpoint *)filter_list.next;
-		in_port_t * port = NULL;
-		fd_list_unlink(&ep->chain);
-		
-		switch( ep->sa.sa_family ) {
-		case AF_INET: port = &ep->sin.sin_port; break;
-		case AF_INET6: port = &ep->sin6.sin6_port; break;
-		}
-		
-		if (port) {
-			if (fd_g_config->cnf_port) {
-				*port = htons(fd_g_config->cnf_port);
-				CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));
-			}
-			if (fd_g_config->cnf_port_tls) {
-				*port = htons(fd_g_config->cnf_port_tls);
-				CHECK_FCT(fd_ep_add_merge( &fd_g_config->cnf_endpoints, &ep->sa, sSAlen(&ep->sa), ep->flags ));
-			}
-		}
-		free(ep);
-	}
-	#endif /* ADDRESS_AVP_INCLUDE_PORT */
-	
 	{
 		char * buf = NULL;
