From eac1961983b8e7a74c494feedcb878170b135072 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Sat, 26 Dec 2020 21:41:38 +0100 Subject: [PATCH] dhcpv6: fix displaying IA info Fix using ntohl and make clear if the recieved IA is either an IA_PD or IA_NA option Signed-off-by: Hans Dedecker --- src/dhcpv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 60c0b24..51b9992 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -883,7 +883,7 @@ int dhcpv6_poll_reconfigure(void) switch (ret) { /* * Only RENEW/REBIND/INFORMATION REQUEST - * messaage transmission can be requested + * message transmission can be requested * by a RECONFIGURE */ case DHCPV6_MSG_RENEW: @@ -1346,7 +1346,7 @@ static unsigned int dhcpv6_parse_ia(void *opt, void *end) if (t1 > t2) return 0; - syslog(LOG_INFO, "IAID %04x T1 %d T2 %d", htonl(ia_hdr->iaid), t1, t2); + syslog(LOG_INFO, "%s %04x T1 %d T2 %d", ntohs(ia_hdr->type) == DHCPV6_OPT_IA_PD ? "IA_PD" : "IA_NA", ntohl(ia_hdr->iaid), t1, t2); // Update address IA dhcpv6_for_each_option(&ia_hdr[1], end, otype, olen, odata) { -- 2.30.2