diff --git a/src/ca/if_depen.c b/src/ca/if_depen.c index da4023af7..12a70571c 100644 --- a/src/ca/if_depen.c +++ b/src/ca/if_depen.c @@ -43,7 +43,6 @@ static char *sccsId = "@(#) $Id$"; * also called by the server. All locks required are applied at * a higher level. */ -#define DEBUG #ifdef DEBUG # define ifDepenDebugPrintf(argsInParen) printf argsInParen #else @@ -198,6 +197,13 @@ epicsShareFunc void epicsShareAPI caDiscoverInterfaces continue; } + status = socket_ioctl (socket, SIOCGIFADDR, pifreq); + if ( status ) { + errlogPrintf ("osiSockDiscoverInterfaces(): net intf \"%s\": if addr fetch fail\n", pifreq->ifr_name); + free ( pNewNode ); + continue; + } + pNewNode->srcAddr.sa = pifreq->ifr_addr; if ( pNewNode->destAddr.sa.sa_family == AF_INET ) {