Skip to content

Commit

Permalink
[Server] Identify type of IP connection in monitoring (&I=4|6 in 'u' …
Browse files Browse the repository at this point in the history
…record).
  • Loading branch information
abh3 committed Mar 5, 2018
1 parent ee3fb8e commit 674e5e6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/XrdXrootd/XrdXrootdXeq.cc
Expand Up @@ -938,8 +938,9 @@ int XrdXrootdProtocol::do_Login()
}
if (Monitor.Ready() && (appXQ || aInfo))
{char apBuff[1024];
snprintf(apBuff, sizeof(apBuff), "&x=%s&y=%s",
(appXQ ? appXQ : ""), (aInfo ? aInfo : ""));
snprintf(apBuff, sizeof(apBuff), "&x=%s&y=%s&I=%c",
(appXQ ? appXQ : ""), (aInfo ? aInfo : ""),
(clientPV & XrdOucEI::uIPv4 ? '4' : '6'));
Entity.moninfo = strdup(apBuff);
}
}
Expand Down Expand Up @@ -3425,15 +3426,17 @@ void XrdXrootdProtocol::MonAuth()
const char *bP = Buff;

if (Client == &Entity) bP = Entity.moninfo;
else snprintf(Buff,sizeof(Buff), "&p=%s&n=%s&h=%s&o=%s&r=%s&g=%s&m=%s%s",
else snprintf(Buff,sizeof(Buff),
"&p=%s&n=%s&h=%s&o=%s&r=%s&g=%s&m=%s%s&I=%c",
Client->prot,
(Client->name ? Client->name : ""),
(Client->host ? Client->host : ""),
(Client->vorg ? Client->vorg : ""),
(Client->role ? Client->role : ""),
(Client->grps ? Client->grps : ""),
(Client->moninfo ? Client->moninfo : ""),
(Entity.moninfo ? Entity.moninfo : "")
(Entity.moninfo ? Entity.moninfo : ""),
(clientPV & XrdOucEI::uIPv4 ? '4' : '6')
);

Monitor.Report(bP);
Expand Down

0 comments on commit 674e5e6

Please sign in to comment.