Skip to content

Commit cb5287c

Browse files
committed
fix(scan): fixed name resolution (#1406)
1 parent c85db47 commit cb5287c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ns-api/files/ns.scan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def scan(device):
4343
if len(parts) < 2:
4444
continue
4545
try:
46-
hostname = socket.getnameinfo((parts[1], 0), 0)[0]
46+
hostname = socket.getnameinfo((parts[0], 0), 0)[0]
4747
except:
4848
hostname = ""
4949
ret.append({"mac": parts[1], "ip": parts[0], "hostname": hostname, "description": parts[2] if len(parts) > 2 else ""})

0 commit comments

Comments
 (0)