summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorPatrick Mooney <patrick.f.mooney@gmail.com>2015-01-06 19:42:18 +0000
committerPatrick Mooney <patrick.f.mooney@gmail.com>2015-01-06 20:18:18 +0000
commiteb9873bb7b9650b2e1eb9db5b52eb6d2345c9392 (patch)
treebc7dcd77cf58692826dab2f0833c1ed2c6509184 /usr/src
parent61ac89eea3fc910c84809d0882b86173297c61c4 (diff)
downloadillumos-joyent-eb9873bb7b9650b2e1eb9db5b52eb6d2345c9392.tar.gz
OS-3681 lxbrand SIOCGIFHWADDR results incorrect
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/brand/lx/syscall/lx_ioctl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_ioctl.c b/usr/src/uts/common/brand/lx/syscall/lx_ioctl.c
index 14d8d47d67..0ce9b65ce8 100644
--- a/usr/src/uts/common/brand/lx/syscall/lx_ioctl.c
+++ b/usr/src/uts/common/brand/lx/syscall/lx_ioctl.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2014 Joyent, Inc. All rights reserved.
+ * Copyright 2015 Joyent, Inc. All rights reserved.
*/
#include <sys/errno.h>
@@ -23,6 +23,7 @@
#include <sys/termios.h>
#include <sys/ptyvar.h>
#include <net/if.h>
+#include <net/if_dl.h>
#include <sys/sockio.h>
#include <sys/stropts.h>
#include <sys/ptms.h>
@@ -875,7 +876,13 @@ ict_siolifreq(file_t *fp, int cmd, intptr_t arg, int lxcmd)
lreq.lifr_addr.ss_family = 772;
error = 0;
} else if (error == 0) {
- /* Default to Ethernet for all successes */
+ /* convert illumos sockaddr to Linux */
+ struct sockaddr_dl *src =
+ (struct sockaddr_dl *)&lreq.lifr_addr;
+ caddr_t dst = (caddr_t)&lreq.lifr_addr +
+ sizeof (lreq.lifr_addr.ss_family);
+ bcopy(LLADDR(src), dst, src->sdl_alen);
+ /* Default to Ethernet type for all successes */
lreq.lifr_addr.ss_family = 1;
}
break;