-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issue #111: Fix LinuxIpNetwork #157
Changes from 6 commits
39b28c4
3c1ccf3
96dd37e
b5503c8
4217562
c333773
1960d2a
0fc86b8
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 | ||||
---|---|---|---|---|---|---|
|
@@ -2,12 +2,8 @@ BEGIN { | |||||
deviceID = "" | ||||||
} | ||||||
|
||||||
/^lo[0-9]* / { | ||||||
deviceID = "" | ||||||
} | ||||||
|
||||||
#ifconfig | ||||||
$1 ~ /^eth[0-9][0-9]*:?|^vmnic[0-9][0-9]*:?|^em[0-9]*:?|^[Pp][0-9][0-9]*[Pp][0-9][0-9]*:?|^en[os][0-9]*:?|^enp[0-9]*s[0-9]*:?/ { | ||||||
/^./ && ($2 ~ /flags/ || $2 ~ /Link/ && $3 ~ /encap/) { | ||||||
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. The first regex is probably unnecessary:
Suggested change
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.
@bertysentry Yes, you are right. It's an unnecessary. I removed it and checked the result again. It works. |
||||||
deviceID = $1 | ||||||
gsub(":", "", deviceID) | ||||||
ports[deviceID] = deviceID | ||||||
|
@@ -19,9 +15,9 @@ $1 ~ /^eth[0-9][0-9]*:?|^vmnic[0-9][0-9]*:?|^em[0-9]*:?|^[Pp][0-9][0-9]*[Pp][0-9 | |||||
} | ||||||
} | ||||||
|
||||||
/ +inet addr:[0-9]+/ { | ||||||
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. We should still support |
||||||
ipAddress[deviceID] = $2 | ||||||
gsub("addr:", "", ipAddress[deviceID]) | ||||||
/ +inet (addr:)?/ { | ||||||
ipAddress[deviceID] = $2 | ||||||
gsub("addr:", "", ipAddress[deviceID]) | ||||||
} | ||||||
|
||||||
(/ UP /) { | ||||||
|
@@ -38,5 +34,4 @@ END { | |||||
print "MSHW;" deviceID ";" macAddress[deviceID] ";" ipAddress[deviceID] ";" | ||||||
} | ||||||
} | ||||||
} | ||||||
|
||||||
} |
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.
Lowercase or uppercaseh
for the directory name?Sorry, don't bother! 😅