mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 02:30:08 +01:00
platform: improve logging message for failure to add route
The errno for this particular failure differs between IPv4 and IPv6. Of course it does.
This commit is contained in:
parent
de750acee7
commit
03a9bb88aa
1 changed files with 6 additions and 4 deletions
|
|
@ -3989,10 +3989,12 @@ nm_platform_ip_route_sync (NMPlatform *self,
|
|||
} else {
|
||||
const char *reason = "";
|
||||
|
||||
if ( -((int) plerr) == ENETUNREACH
|
||||
&& ( vt->is_ip4
|
||||
? !!NMP_OBJECT_CAST_IP4_ROUTE (conf_o)->gateway
|
||||
: !IN6_IS_ADDR_UNSPECIFIED (&NMP_OBJECT_CAST_IP6_ROUTE (conf_o)->gateway)))
|
||||
if ( ( -((int) plerr) == ENETUNREACH
|
||||
&& vt->is_ip4
|
||||
&& !!NMP_OBJECT_CAST_IP4_ROUTE (conf_o)->gateway)
|
||||
|| ( -((int) plerr) == EHOSTUNREACH
|
||||
&& !vt->is_ip4
|
||||
&& !IN6_IS_ADDR_UNSPECIFIED (&NMP_OBJECT_CAST_IP6_ROUTE (conf_o)->gateway)))
|
||||
reason = "; is the gateway directly reachable?";
|
||||
|
||||
_LOGW ("route-sync: failure to add IPv%c route: %s: %s%s",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue