-
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
Conversation
MedMaalej
commented
Jan 9, 2025
- Refactor network interface detection logic in networkDiscovery.awk
- Refactor network interface detection logic in networkCollect.awk
- Update LinuxNetwork-header
* Refactor network interface detection logic in networkDiscovery.awk * Refactor network interface detection logic in networkCollect.awk * Update LinuxNetwork-header
While we're there, we should merge all Linux network connectors in the same directory! |
* Refactor network interface detection logic in networkDiscovery.awk * Refactor network interface detection logic in networkCollect.awk * Update LinuxNetwork-header
* Refactor network interface detection logic in networkDiscovery.awk for LinuxIfconfigNetwork * Refactor network interface detection logic in networkCollect.awk for LinuxIfConfigNetwork * Update Hardware folder path reference in LinuxIpNetwork and LinuxIfConfigNetwork
* Merge LinuxIpNetwork, LinuxIfConfigNetwork and LinuxNetwork-header under LinuxNetwork folder
* Update interface name detection regex in LinuxIfConfigNetwork
…ommunity-connectors into feature/issue-111-Fix-LinuxIpNetwork
@@ -19,7 +15,7 @@ $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 comment
The reason will be displayed to describe this comment to others. Learn more.
We should still support addr:
@@ -8,7 +8,7 @@ BEGIN { | |||
} | |||
|
|||
# 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]*:?/ { | |||
$1 ~ /:$/ && $2 ~ /flags/ { |
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.
Make sure flags is always available.
#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 comment
The reason will be displayed to describe this comment to others. Learn more.
The first regex is probably unnecessary:
/^./ && ($2 ~ /flags/ || $2 ~ /Link/ && $3 ~ /encap/) { | |
($2 ~ /flags/ || $2 ~ /Link/ && $3 ~ /encap/) { |
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.
The first regex is probably unnecessary:
@bertysentry Yes, you are right. It's an unnecessary. I removed it and checked the result again. It works.
@@ -1,6 +1,6 @@ | |||
--- | |||
extends: | |||
- ../Hardware/Hardware | |||
- ../../Hardware/Hardware |
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 uppercase h
for the directory name?
Sorry, don't bother! 😅
* Update interface name detection regex in LinuxIfConfigNetwork
…ommunity-connectors into feature/issue-111-Fix-LinuxIpNetwork