mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 17:20:31 +01:00
core: add a multicast route entry for connections with link-local IPv4 address
This commit is contained in:
parent
d3688c7bcd
commit
7e054ff138
1 changed files with 9 additions and 0 deletions
|
|
@ -1019,6 +1019,7 @@ aipd_get_ip4_config (NMDevice *self, NMDeviceStateReason *reason)
|
|||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
NMIP4Config *config = NULL;
|
||||
NMIP4Address *addr;
|
||||
NMIP4Route *route;
|
||||
|
||||
g_return_val_if_fail (priv->aipd_addr > 0, NULL);
|
||||
|
||||
|
|
@ -1033,6 +1034,14 @@ aipd_get_ip4_config (NMDevice *self, NMDeviceStateReason *reason)
|
|||
nm_ip4_address_set_prefix (addr, 16);
|
||||
nm_ip4_config_take_address (config, addr);
|
||||
|
||||
/* Add a multicast route for link-local connections: destination= 224.0.0.0, netmask=240.0.0.0 */
|
||||
route = nm_ip4_route_new ();
|
||||
nm_ip4_route_set_dest (route, (guint32) htonl (0xE0000000L));
|
||||
nm_ip4_route_set_prefix (route, 4);
|
||||
nm_ip4_route_set_next_hop (route, (guint32) 0);
|
||||
nm_ip4_route_set_metric (route, 0);
|
||||
nm_ip4_config_take_route (config, route);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue