Fix radius.c again. Previous was old one.
authoryasuoka <yasuoka@openbsd.org>
Sat, 13 Jul 2024 14:08:53 +0000 (14:08 +0000)
committeryasuoka <yasuoka@openbsd.org>
Sat, 13 Jul 2024 14:08:53 +0000 (14:08 +0000)
sbin/iked/radius.c

index 1a89962..f1255a4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: radius.c,v 1.4 2024/07/13 12:25:07 yasuoka Exp $      */
+/*     $OpenBSD: radius.c,v 1.5 2024/07/13 14:08:53 yasuoka Exp $      */
 
 /*
  * Copyright (c) 2024 Internet Initiative Japan Inc.
@@ -870,9 +870,9 @@ iked_radius_dae_on_event(int fd, short ev, void *ctx)
        }
        if (radius_get_uint32_attr(req, RADIUS_TYPE_FRAMED_IP_ADDRESS, &u32)
             == 0) {
-               addr4 = sa->sa_addrpool;
-               if (addr4 != NULL) {
-                       RB_FOREACH(sa, iked_sas, &env->sc_sas) {
+               RB_FOREACH(sa, iked_sas, &env->sc_sas) {
+                       addr4 = sa->sa_addrpool;
+                       if (addr4 != NULL) {
                                if (u32 == ((struct sockaddr_in *)&addr4->addr)
                                    ->sin_addr.s_addr) {
                                        ikev2_ike_sa_setreason(sa, reason);