]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move and rename files
authorAlan T. DeKok <aland@freeradius.org>
Sat, 7 Dec 2024 15:55:43 +0000 (10:55 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 7 Dec 2024 15:55:43 +0000 (10:55 -0500)
src/modules/rlm_radius2/all.mk
src/modules/rlm_radius2/bio.c [moved from src/modules/rlm_radius2/rlm_radius_udp.c with 99% similarity]
src/modules/rlm_radius2/rlm_radius.c
src/modules/rlm_radius2/rlm_radius.mk [deleted file]

index 52abbb6bf082be3a4498afa4eff27f3fde11d629..c8a7b8ca9ec770d99326cedfec0cd13196cee36d 100644 (file)
@@ -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
similarity index 99%
rename from src/modules/rlm_radius2/rlm_radius_udp.c
rename to src/modules/rlm_radius2/bio.c
index 9748297437b53b0ddfbd3ccde5e4c4ad10c9223f..a46dd9fbe6c7f28a83919fe30f8b0884f9eba1c0 100644 (file)
@@ -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);
 
index 94e69edb2d718f3ecd027a96fa6bcbd374e94c8b..230f6e9a4344f98568946888242f78c64a042bc4 100644 (file)
@@ -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 (file)
index 52bd795..0000000
+++ /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