[ovs-dev,04/21] netdev-bsd: Update after eth_addr changes
diff mbox

Message ID 1445228952-22445-4-git-send-email-yamamoto@midokura.com
State Awaiting Upstream
Headers show

Commit Message

Takashi Yamamoto Oct. 19, 2015, 4:28 a.m. UTC
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
---
 lib/netdev-bsd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Pfaff Nov. 9, 2015, 11:23 p.m. UTC | #1
On Mon, Oct 19, 2015 at 01:28:55PM +0900, YAMAMOTO Takashi wrote:
> Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>

Acked-by: Ben Pfaff <blp@ovn.org>

Patch
diff mbox

diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 60e5615..118ef32 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -1753,7 +1753,7 @@  set_etheraddr(const char *netdev_name OVS_UNUSED, int hwaddr_family OVS_UNUSED,
     if (error) {
         return error;
     }
-    if (!memcmp(&sdl->sdl_data[sdl->sdl_nlen], mac, hwaddr_len)) {
+    if (!memcmp(&sdl->sdl_data[sdl->sdl_nlen], &mac, hwaddr_len)) {
         return 0;
     }
     oldaddr = req.addr;
@@ -1765,7 +1765,7 @@  set_etheraddr(const char *netdev_name OVS_UNUSED, int hwaddr_family OVS_UNUSED,
     sdl->sdl_len = offsetof(struct sockaddr_dl, sdl_data) + hwaddr_len;
     sdl->sdl_alen = hwaddr_len;
     sdl->sdl_family = hwaddr_family;
-    memcpy(sdl->sdl_data, mac, hwaddr_len);
+    memcpy(sdl->sdl_data, &mac, hwaddr_len);
     error = af_link_ioctl(SIOCALIFADDR, &req);
     if (error) {
         return error;