From: Alan T. DeKok Date: Sat, 7 Dec 2024 15:55:43 +0000 (-0500) Subject: move and rename files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d3f546df8ce71ea2cd9ce83b2f4a19b7293905d;p=thirdparty%2Ffreeradius-server.git move and rename files --- diff --git a/src/modules/rlm_radius2/all.mk b/src/modules/rlm_radius2/all.mk index 52abbb6bf08..c8a7b8ca9ec 100644 --- a/src/modules/rlm_radius2/all.mk +++ b/src/modules/rlm_radius2/all.mk @@ -3,5 +3,12 @@ # normal build. # ifneq "${WITH_RADIUS2}" "" -SUBMAKEFILES := rlm_radius.mk +TARGETNAME := rlm_radius +TARGET := $(TARGETNAME)$(L) + +SOURCES := rlm_radius.c track.c + +TGT_PREREQS := libfreeradius-radius$(L) libfreeradius-bio-config$(L) libfreeradius-bio$(L) +LOG_ID_LIB = 39 + endif diff --git a/src/modules/rlm_radius2/rlm_radius_udp.c b/src/modules/rlm_radius2/bio.c similarity index 99% rename from src/modules/rlm_radius2/rlm_radius_udp.c rename to src/modules/rlm_radius2/bio.c index 9748297437b..a46dd9fbe6c 100644 --- a/src/modules/rlm_radius2/rlm_radius_udp.c +++ b/src/modules/rlm_radius2/bio.c @@ -93,12 +93,6 @@ typedef struct { uint32_t max_packet_size; //!< Our max packet size. may be different from the parent. - fr_ipaddr_t src_ipaddr; //!< Source IP address. May be altered on bind - //!< to be the actual IP address packets will be - //!< sent on. This is why we can't use the inst - //!< src_ipaddr field. - uint16_t src_port; //!< Source port specific to this connection. - uint8_t *buffer; //!< Receive buffer. size_t buflen; //!< Receive buffer length. @@ -457,8 +451,8 @@ static void conn_readable_status_check(fr_event_list_t *el, UNUSED int fd, UNUSE return; /* Wait to be signalled again */ case ECONNREFUSED: - ERROR("%s - Failed reading response from socket: there is no server listening on %pV port %u", - h->module_name, fr_box_ipaddr(h->inst->fd_config.dst_ipaddr), h->inst->fd_config.dst_port); + ERROR("%s - Failed reading response from socket: there is no server listening on outgoing connection %s", + h->module_name, h->name); break; default: @@ -648,8 +642,6 @@ static connection_state_t conn_init(void **h_out, connection_t *conn, void *uctx h->thread = thread; h->inst = thread->inst; h->module_name = h->inst->name; - h->src_ipaddr = h->inst->fd_config.src_ipaddr; - h->src_port = 0; h->max_packet_size = h->inst->max_packet_size; h->last_idle = fr_time(); @@ -689,8 +681,8 @@ static connection_state_t conn_init(void **h_out, connection_t *conn, void *uctx */ h->name = fr_asprintf(h, "proto %s local %pV port %u remote %pV port %u", h->inst->fd_config.transport, - fr_box_ipaddr(h->src_ipaddr), h->src_port, - fr_box_ipaddr(h->inst->fd_config.dst_ipaddr), h->inst->fd_config.dst_port); + fr_box_ipaddr(h->fd_info->socket.inet.src_ipaddr), h->fd_info->socket.inet.src_port, + fr_box_ipaddr(h->fd_info->socket.inet.dst_ipaddr), h->fd_info->socket.inet.dst_port); talloc_set_destructor(h, _udp_handle_free); diff --git a/src/modules/rlm_radius2/rlm_radius.c b/src/modules/rlm_radius2/rlm_radius.c index 94e69edb2d7..230f6e9a434 100644 --- a/src/modules/rlm_radius2/rlm_radius.c +++ b/src/modules/rlm_radius2/rlm_radius.c @@ -192,7 +192,7 @@ fr_dict_attr_autoload_t rlm_radius_dict_attr[] = { { NULL } }; -#include "rlm_radius_udp.c" +#include "bio.c" /** Set which types of packets we can parse * diff --git a/src/modules/rlm_radius2/rlm_radius.mk b/src/modules/rlm_radius2/rlm_radius.mk deleted file mode 100644 index 52bd795c0ee..00000000000 --- a/src/modules/rlm_radius2/rlm_radius.mk +++ /dev/null @@ -1,7 +0,0 @@ -TARGETNAME := rlm_radius -TARGET := $(TARGETNAME)$(L) - -SOURCES := rlm_radius.c track.c - -TGT_PREREQS := libfreeradius-radius$(L) libfreeradius-bio-config$(L) libfreeradius-bio$(L) -LOG_ID_LIB = 39