summaryrefslogtreecommitdiff
path: root/loginrec.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/loginrec.c b/loginrec.c
index 4219b9aef..94ae81dc6 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -787,12 +787,12 @@ construct_utmpx(struct logininfo *li, struct utmpx *utx)
787 /* this is just a 128-bit IPv6 address */ 787 /* this is just a 128-bit IPv6 address */
788 if (li->hostaddr.sa.sa_family == AF_INET6) { 788 if (li->hostaddr.sa.sa_family == AF_INET6) {
789 sa6 = ((struct sockaddr_in6 *)&li->hostaddr.sa); 789 sa6 = ((struct sockaddr_in6 *)&li->hostaddr.sa);
790 memcpy(ut->ut_addr_v6, sa6->sin6_addr.s6_addr, 16); 790 memcpy(utx->ut_addr_v6, sa6->sin6_addr.s6_addr, 16);
791 if (IN6_IS_ADDR_V4MAPPED(&sa6->sin6_addr)) { 791 if (IN6_IS_ADDR_V4MAPPED(&sa6->sin6_addr)) {
792 ut->ut_addr_v6[0] = ut->ut_addr_v6[3]; 792 utx->ut_addr_v6[0] = utx->ut_addr_v6[3];
793 ut->ut_addr_v6[1] = 0; 793 utx->ut_addr_v6[1] = 0;
794 ut->ut_addr_v6[2] = 0; 794 utx->ut_addr_v6[2] = 0;
795 ut->ut_addr_v6[3] = 0; 795 utx->ut_addr_v6[3] = 0;
796 } 796 }
797 } 797 }
798# endif 798# endif