From c8c197bf3a5c10039556b154d086d09814908ebb Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Wed, 2 Aug 2023 19:23:13 +0900 Subject: [PATCH] processppp: fix IP log when tunnel IP source change fmtaddr formats the string to a static buffer that must be selected manually, but this log message was re-using the same buffer. Use another index for 2nd IP so we get to know which is what. Fixes: 2429969bd04d ("Add L2TP offloading support") --- l2tpns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2tpns.c b/l2tpns.c index 33a2bb1..572443f 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -4738,7 +4738,7 @@ static void processppp(sessionidt s, uint8_t *buf, int len, uint8_t *p, int l, s { // The remotes BAS are a clustered l2tpns server and the source IP has changed LOG(2, s, t, "The tunnel IP source (%s) has changed by new IP (%s)\n", - fmtaddr(htonl(tunnel[t].ip), 0), fmtaddr(addr->sin_addr.s_addr, 0)); + fmtaddr(htonl(tunnel[t].ip), 0), fmtaddr(addr->sin_addr.s_addr, 1)); tunnel[t].ip = ntohl(addr->sin_addr.s_addr);