From 836eeaed9350d64cba82c54820b324b4c08d42c3 Mon Sep 17 00:00:00 2001 From: yasuoka Date: Sun, 14 Jul 2024 13:36:44 +0000 Subject: [PATCH] Add "radiusd" field to struct radius_query. --- usr.sbin/radiusd/radiusd.c | 5 +++-- usr.sbin/radiusd/radiusd_local.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/radiusd/radiusd.c b/usr.sbin/radiusd/radiusd.c index 3409b25f2b0..973ce748f27 100644 --- a/usr.sbin/radiusd/radiusd.c +++ b/usr.sbin/radiusd/radiusd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd.c,v 1.47 2024/07/13 13:06:47 yasuoka Exp $ */ +/* $OpenBSD: radiusd.c,v 1.48 2024/07/14 13:36:44 yasuoka Exp $ */ /* * Copyright (c) 2013, 2023 Internet Initiative Japan Inc. @@ -536,6 +536,7 @@ radiusd_listen_handle_packet(struct radiusd_listen *listn, strlcpy(q->username, username, sizeof(q->username)); q->id = ++radius_query_id_seq; + q->radiusd = listn->radiusd; q->clientaddrlen = peerlen; memcpy(&q->clientaddr, peer, peerlen); q->listen = listn; @@ -812,7 +813,7 @@ radiusd_access_request_aborted(struct radius_query *q) radius_delete_packet(q->req); if (q->res != NULL) radius_delete_packet(q->res); - TAILQ_REMOVE(&q->listen->radiusd->query, q, next); + TAILQ_REMOVE(&q->radiusd->query, q, next); free(q); } diff --git a/usr.sbin/radiusd/radiusd_local.h b/usr.sbin/radiusd/radiusd_local.h index 4fed590c077..439f12fa8d3 100644 --- a/usr.sbin/radiusd/radiusd_local.h +++ b/usr.sbin/radiusd/radiusd_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd_local.h,v 1.12 2024/07/09 17:26:14 yasuoka Exp $ */ +/* $OpenBSD: radiusd_local.h,v 1.13 2024/07/14 13:36:44 yasuoka Exp $ */ /* * Copyright (c) 2013 Internet Initiative Japan Inc. @@ -126,6 +126,7 @@ struct radiusd { struct radius_query { u_int id; + struct radiusd *radiusd; struct sockaddr_storage clientaddr; int clientaddrlen; int req_id; -- 2.20.1