Skip to content

Commit

Permalink
Use correct private address when there is more than one address.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 2, 2014
1 parent 595a983 commit d46e854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdNet/XrdNetIF.cc
Expand Up @@ -111,9 +111,9 @@ bool XrdNetIF::GenAddrs(ifAddrs &ifTab, XrdNetAddrInfo *src,
if (!XrdNetUtils::GetAddrs(hName,&iP,iN,XrdNetUtils::onlyIPv4, p) && iN)
{for (i = 0; i < iN; i++) {if (!(isPVT ^ iP[i].isPrivate())) break;}
if (i < iN)
{if (!(ifTab.hALen = iP[0].Format(ifTab.hAddr,sizeof(ifTab.hAddr),
{if (!(ifTab.hALen = iP[i].Format(ifTab.hAddr,sizeof(ifTab.hAddr),
XrdNetAddr::fmtAddr, noPort))
|| !(ifTab.hDLen = iP[0].Format(ifTab.hDest,sizeof(ifTab.hDest),
|| !(ifTab.hDLen = iP[i].Format(ifTab.hDest,sizeof(ifTab.hDest),
XrdNetAddr::fmtAdv6, old6M4))) aOK = false;
delete [] iP;
return aOK;
Expand Down

0 comments on commit d46e854

Please sign in to comment.