Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils_net: get default gateway for specific interface
Add optional parameter in order to retrieve the default gateway for a specific interface. On a system with two interfaces, the routes might look like ``` default via 10.172.161.254 dev enc1 proto dhcp src 10.172.160.70 metric 100 default via 192.168.126.1 dev enc2 proto dhcp src 192.168.126.48 metric 102 ``` Filtering only by default will return two ips ``` 10.172.161.254 192.168.126.1 ``` The change allows us to select the interface and thus retrieve only ``` 192.168.126.1 ``` Signed-off-by: Sebastian Mitterle <[email protected]>
- Loading branch information