Re: [PATCH 2/4] Helper functions for uplink dev and gateway

2017-10-17 Thread Gernot Hillier
Am 17.10.2017 um 10:07 schrieb David Woodhouse: > On Wed, 2017-10-11 at 22:40 +0200, Gernot Hillier wrote: >> >> +   get_uplink_gw() { >> +   # If we have a specific route to VPNGATEWAY, then this is our >> +   # Internet uplink (VPN tunnel active). If tunnel is not >>

Re: [PATCH 2/4] Helper functions for uplink dev and gateway

2017-10-17 Thread David Woodhouse
On Wed, 2017-10-11 at 22:40 +0200, Gernot Hillier wrote: > > +   get_uplink_gw() { > +   # If we have a specific route to VPNGATEWAY, then this is our > +   # Internet uplink (VPN tunnel active). If tunnel is not > active, > +   # then the default route sho

[PATCH 2/4] Helper functions for uplink dev and gateway

2017-10-11 Thread Gernot Hillier
Add helper functions to get network device and gateway of default route of our Internet uplink (not the VPN tunnel). (As bonus, we have get_default_dev for /sbin/route mode to get information about currently active default route just to complement get_default_gw.) Signed-off-by: Gernot Hillier --