summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'system.c')
-rw-r--r--system.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/system.c b/system.c
index f1079d5..2e69ef4 100644
--- a/system.c
+++ b/system.c
@@ -458,6 +458,7 @@ void lastlog(void)
int UserId=0;
char tty[LAST_DATA_SIZE];
char hostname[LAST_DATA_SIZE];
+ char hostname6[LAST_DATA_SIZE];
char usercall[10];
char *cp;
int escape;
@@ -494,7 +495,13 @@ void lastlog(void)
}
break;
#endif
- case AF_INET: strcpy(hostname, User.ul_name);
+ case AF_INET: strcpy(hostname, User.call);
+ strcat(hostname, " on IPv4 ");
+ strcat(hostname, User.ul_name);
+ break;
+ case AF_INET6: strcpy(hostname6, User.ul_name);
+ strcat(hostname, User.call);
+ strcat(hostname, " on IPv6");
break;
case AF_UNSPEC: strcpy(hostname, User.call);
strcat(hostname, " on local");