From 7e054ff138e80d31df235171fed5bf9d5c038072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Wed, 9 Jun 2010 15:01:23 +0200 Subject: [PATCH] core: add a multicast route entry for connections with link-local IPv4 address --- src/nm-device.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nm-device.c b/src/nm-device.c index fcd3120538..ba26decaa3 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -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; }