mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 18:20:22 +01:00
core: don't add prefix route for /32 addresses without peer
Kernel doesn't do it either, see function fib_add_ifaddr().
This commit is contained in:
parent
ea1679aac0
commit
d6ee22d198
1 changed files with 7 additions and 0 deletions
|
|
@ -713,6 +713,13 @@ nm_ip4_config_add_dependent_routes (NMIP4Config *self,
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( my_addr->plen == 32
|
||||
&& my_addr->address == my_addr->peer_address) {
|
||||
/* Kernel doesn't add device-routes for /32 addresses unless
|
||||
* they have a peer. */
|
||||
continue;
|
||||
}
|
||||
|
||||
r = nmp_object_new (NMP_OBJECT_TYPE_IP4_ROUTE, NULL);
|
||||
route = NMP_OBJECT_CAST_IP4_ROUTE (r);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue