Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-32664 Fix bug creating DFS Group text causing DNS failures #19271

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions system/jlib/jsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6380,15 +6380,19 @@ StringBuffer &SocketEndpointArray::getText(StringBuffer &text) const
return item(0).getEndpointHostText(text);
byte lastip[4];
const SocketEndpoint &first = item(0);
bool lastis4 = first.getNetAddress(sizeof(lastip),&lastip)==sizeof(lastip);
unsigned short lastport = first.port;
first.getHostText(text);
bool lastis4 = false;
if (!first.queryHostname())
lastis4 = first.getNetAddress(sizeof(lastip),&lastip)==sizeof(lastip);
unsigned short lastport = first.port;
unsigned rep=0;
unsigned range=0;
for (unsigned i=1;i<count;i++) {
byte ip[4];
const SocketEndpoint &ep = item(i);
bool is4 = ep.getNetAddress(sizeof(ip),&ip)==sizeof(ip);
bool is4 = false;
if (!ep.queryHostname())
is4 = ep.getNetAddress(sizeof(ip),&ip)==sizeof(ip);
if (!lastis4||!is4) {
flushText(text,lastport,rep,range);
text.append(',');
Expand Down
Loading