From 4833fb88b9b38953b145348be53b28e2928c9af6 Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Wed, 29 Nov 2017 15:50:33 +0200 Subject: [PATCH] net/trans: remove useless interface detection code --- net/trans.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/net/trans.c b/net/trans.c index 49505358587..e6e2dcc1031 100644 --- a/net/trans.c +++ b/net/trans.c @@ -193,45 +193,6 @@ int fix_all_socket_lists(void) int found = 0; static char buf[PROTO_NAME_MAX_SIZE /* currently we shouldn't hardcode that much */]; char *p; -#if 0 - /* TODO: decide what to do with this */ - struct utsname myname; - - if ((udp_listen==0) - && (tcp_listen==0) - && (tls_listen==0) - && (sctp_listen==0) - ){ - /* get all listening ipv4 interfaces */ - if (add_interfaces(0, AF_INET, 0, PROTO_UDP, &udp_listen)==0){ - /* if ok, try to add the others too */ - if (!tcp_disable){ - if (add_interfaces(0, AF_INET, 0, PROTO_TCP, &tcp_listen)!=0) - goto error; - if (!tls_disable){ - if (add_interfaces(0, AF_INET, 0, PROTO_TLS, - &tls_listen)!=0) - goto error; - } - } - if (!sctp_disable){ - if (add_interfaces(0, AF_INET, 0, PROTO_SCTP, &sctp_listen)!=0) - goto error; - } - }else{ - /* if error fall back to get hostname */ - /* get our address, only the first one */ - if (uname (&myname) <0){ - LM_ERR("cannot determine hostname, try -l address\n"); - goto error; - } - if (add_listen_iface(myname.nodename, 0, 0, 0, 0, 0, 0)!=0){ - LM_ERR("add_listen_iface failed \n"); - goto error; - } - } - } -#endif for (i = PROTO_FIRST; i < PROTO_LAST; i++) { if (protos[i].id != PROTO_NONE) {