regolith-linux / regolith-i3xrocks-config

Regolith customization of i3xrocks.
Other
29 stars 49 forks source link

Add support for bond interface in net-traffic #128

Closed jeffothy closed 2 years ago

jeffothy commented 2 years ago

Use case: I use a bond as my main network interface, this breaks with the most recent change in net-traffic to use /proc/net/route for finding the interface with statistics to be used on the net-traffic i3xrocks script.

Changes:

  1. Add a mocked /proc/net/route to the net traffic test
  2. Allow interfaces with default routes starting with bond, use the active_slave of the bond to detect traffic for the bond interface
  3. Add a new test to validate bond net traffic.

Note: this would be my first contribution to the project, so I'm definitely more than happy to take input/feedback here!

kgilmer commented 2 years ago

@winks , any concerns here?

winks commented 2 years ago

Looks awesome, sorry for breaking your use case, I hadn't thought of bond interfaces. It makes me think again how we could avoid the downsides of the old "filter out" approach and also the current "filter in" :/

kgilmer commented 2 years ago

@jeffothy thanks for your PR and @winks thanks for helping out!