-
Notifications
You must be signed in to change notification settings - Fork 1.1k
IPTraffic: get hostnames from static DHCP list #1136
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3263,7 +3263,18 @@ function oui_query_web(mac){ | |
function clientFromIP(ip) { | ||
for(var i=0; i<clientList.length;i++){ | ||
var clientObj = clientList[clientList[i]]; | ||
if(clientObj.ip == ip) return clientObj; | ||
if(clientObj.ip == ip){ | ||
return clientObj; | ||
} | ||
} | ||
staticList = originData.staticList; | ||
for(var i=0; i<staticList.length; i++){ | ||
if(staticList[i] != ""){ | ||
data = staticList[i].split(">"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on commenting here (or better yet, here?) what the expected format is? I had to go scrounging to find that How about: [1]
It could also be nice (though I don't feel too strongly about it) to set EDIT: The bigger picture here is that Other than that this LGTM. [0] Probably? I was able to find I was able to trace thusly:
but found no definition for [1] assuming the nvram value matches that in |
||
if(data[1] == ip){ | ||
return clientList[data[0]]; | ||
} | ||
} | ||
} | ||
return 0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mixes a formatting change with a functional change. This is small enough that it doesn't strike me as a problem to have it in the same commit, but seems good to avoid in the future.