Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle no default route in get_default_ip_address() (#279)
A host is not required to have a default gateway, more specific routes may be present instead. In this situation get_default_gateway_interface() returns None, which is reasonable. get_default_ip_address() then fails with a struct pack error. This patch allows get_default_ip_address to fall through and also return None when there is no interface identified as the default gateway. Co-authored-by: Jonathan Rosser <jonathan.rosser@rd.bbc.co.uk>
- Loading branch information