From 8185dbe7c4337432602d1c947a4451e0fef2c3ba Mon Sep 17 00:00:00 2001 From: yasuoka Date: Mon, 22 Jul 2024 10:00:16 +0000 Subject: [PATCH] Fix ipcp module to use (the maximum sequence number from the db) + 1 properly. --- usr.sbin/radiusd/radiusd_ipcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/radiusd/radiusd_ipcp.c b/usr.sbin/radiusd/radiusd_ipcp.c index 4f34d2972fd..c4b6ca7fea3 100644 --- a/usr.sbin/radiusd/radiusd_ipcp.c +++ b/usr.sbin/radiusd/radiusd_ipcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd_ipcp.c,v 1.6 2024/07/22 09:39:23 yasuoka Exp $ */ +/* $OpenBSD: radiusd_ipcp.c,v 1.7 2024/07/22 10:00:16 yasuoka Exp $ */ /* * Copyright (c) 2024 Internet Initiative Japan Inc. @@ -1347,8 +1347,8 @@ ipcp_restore_from_db(struct module_ipcp *self) if ((assigned = ipcp_ipv4_assign(self, user, ipv4)) == NULL) return (-1); - self->seq = MAXIMUM(assigned->seq + 1, self->seq); assigned->seq = record->seq; + self->seq = MAXIMUM(assigned->seq + 1, self->seq); strlcpy(assigned->auth_method, record->auth_method, sizeof(assigned->auth_method)); strlcpy(assigned->session_id, record->session_id, -- 2.20.1