Mercurial > hg > freeDiameter
comparison freeDiameter/p_cnx.c @ 379:7337305ee51e
Workaround to prevent peer connecting to itself (ipv6 local addresses)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 05 Jul 2010 17:04:46 +0900 |
parents | 40507b3750da |
children |
comparison
equal
deleted
inserted
replaced
378:41e3c2a3721c | 379:7337305ee51e |
---|---|
115 CHECK_FCT( fd_ep_filter_family( | 115 CHECK_FCT( fd_ep_filter_family( |
116 &peer->p_hdr.info.pi_endpoints, | 116 &peer->p_hdr.info.pi_endpoints, |
117 AF_INET)); | 117 AF_INET)); |
118 } | 118 } |
119 | 119 |
120 /* Remove any local address that would be here, it should not happen but it does sometimes... */ | |
121 CHECK_FCT( fd_ep_filter_list(&peer->p_hdr.info.pi_endpoints, &fd_g_config->cnf_endpoints) ); | |
122 | |
120 /* Now check we have at least one address to attempt */ | 123 /* Now check we have at least one address to attempt */ |
121 if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { | 124 if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { |
122 fd_log_debug("No address %savailable to connect to peer '%s', aborting\n", peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid); | 125 fd_log_debug("No address %savailable to connect to peer '%s', aborting\n", peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid); |
123 fd_psm_terminate( peer, NULL ); | 126 fd_psm_terminate( peer, NULL ); |
124 return 0; | 127 return 0; |