2005-02-11 Dan Williams <dcbw@redhat.com>
Patch from Dave Woodhouse for IPv6: * src/NetworkManagerUtils.c - (nm_ethernet_address_is_valid): Check for prism54 dummy MAC address and multicast addresses * src/NetworkManagerDevice.c - (nm_device_set_up_down): make sure our cached MAC address is up-to-date after bringing up a card. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@435 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2005-02-11 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Dave Woodhouse for IPv6:
|
||||
* src/NetworkManagerUtils.c
|
||||
- (nm_ethernet_address_is_valid): Check for prism54 dummy MAC address
|
||||
and multicast addresses
|
||||
|
||||
* src/NetworkManagerDevice.c
|
||||
- (nm_device_set_up_down): make sure our cached MAC address is up-to-date
|
||||
after bringing up a card.
|
||||
|
||||
2005-02-10 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
Patch from Dave Woodhouse:
|
||||
|
@@ -1512,6 +1512,11 @@ static void nm_device_set_up_down (NMDevice *dev, gboolean up)
|
||||
if ((err = ioctl (sk, SIOCSIFFLAGS, &ifr)))
|
||||
syslog (LOG_ERR, "nm_device_set_up_down() could not bring device %s %s. errno = %d", nm_device_get_iface (dev), (up ? "up" : "down"), errno );
|
||||
}
|
||||
/* Make sure we have a valid MAC address, some cards reload firmware when they
|
||||
* are brought up.
|
||||
*/
|
||||
if (!nm_ethernet_address_is_valid((struct ether_addr *)dev->hw_addr))
|
||||
nm_device_update_hw_address(dev);
|
||||
}
|
||||
else
|
||||
syslog (LOG_ERR, "nm_device_set_up_down() could not get flags for device %s. errno = %d", nm_device_get_iface (dev), errno );
|
||||
|
@@ -182,13 +182,16 @@ gboolean nm_ethernet_address_is_valid (struct ether_addr *test_addr)
|
||||
struct ether_addr invalid_addr1 = { {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} };
|
||||
struct ether_addr invalid_addr2 = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
|
||||
struct ether_addr invalid_addr3 = { {0x44, 0x44, 0x44, 0x44, 0x44, 0x44} };
|
||||
struct ether_addr invalid_addr4 = { {0x00, 0x30, 0xb4, 0x00, 0x00, 0x00} }; /* prism54 dummy MAC */
|
||||
|
||||
g_return_val_if_fail (test_addr != NULL, FALSE);
|
||||
|
||||
/* Compare the AP address the card has with invalid ethernet MAC addresses. */
|
||||
if ( (memcmp(test_addr, &invalid_addr1, sizeof(struct ether_addr)) != 0)
|
||||
&& (memcmp(test_addr, &invalid_addr2, sizeof(struct ether_addr)) != 0)
|
||||
&& (memcmp(test_addr, &invalid_addr3, sizeof(struct ether_addr)) != 0))
|
||||
&& (memcmp(test_addr, &invalid_addr3, sizeof(struct ether_addr)) != 0)
|
||||
&& (memcmp(test_addr, &invalid_addr4, sizeof(struct ether_addr)) != 0)
|
||||
&& ((test_addr->ether_addr_octet[0] & 1) == 0)) /* Multicast addresses */
|
||||
valid = TRUE;
|
||||
|
||||
return (valid);
|
||||
|
Reference in New Issue
Block a user