-
Notifications
You must be signed in to change notification settings - Fork 522
Nonstandard interface names not being detected by sosetup #955
Comments
Hi @cskeen , If you'd like, you can submit these changes via pull request: |
submitted for testing: |
Thanks! I was planning on doing a pull request when I got in this morning, but it's already done. |
Looking at #304, I see that @timwhisnant submitted an alternative idiom that was less strict. I went back and looked at where our idiom originally came from and found it in /usr/lib/nsmnow/lib-nsm-common-utils. We've had to update it many times over the years to allow for more modern interfaces and we still don't allow for totally custom interface names like "DMZ". I wonder if it's time to move to a less strict idiom so that we won't have to update this anymore. Something like this:
In words:
Thoughts? |
I, for one, would prefer the less strict idiom. Having sosetup fail to detect an interface because it has an unusual name seems like more of a problem than the off chance of some bogus interface showing up in /proc/net/dev. In that sense, I feel that it would be better to present all the interface options (other than loopback) rather than trying to filter them for some expected convention. |
submitted for testing: |
My only concern when submitting this issue was that the sguil database submitted for testing: — |
Thanks all ! |
Sosetup will not detect anything but standard interface names, which precludes the use of more friendly naming conventions (for example, eth_left or eth_right) for interfaces.
This is caused by the use of the following idiom for detecting interfaces:
cat "/proc/net/dev" | egrep "(eth|bond|wlan|br|ath|bge|mon|fe|em|p[0-5]p)[0-9]+" | awk '{print $1}' | cut -d: -f1 |sort
Changing it to the following would resolve this issue in most cases:
cat "/proc/net/dev" | egrep "(eth|bond|wlan|br|ath|bge|mon|fe|em|p[0-5]p)\w+" | awk '{print $1}' | cut -d: -f1 |sort
This idiom also appears in sosetup-network.
The text was updated successfully, but these errors were encountered: