From: Arran Cudbard-Bell Date: Wed, 19 Jun 2024 20:11:40 +0000 (-0600) Subject: Fix confusing name X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19eafdf755bc4b049387fbd8232f8ae58e5bda98;p=thirdparty%2Ffreeradius-server.git Fix confusing name --- diff --git a/src/bin/dhcpclient.c b/src/bin/dhcpclient.c index 50e7687664c..85d39e47a69 100644 --- a/src/bin/dhcpclient.c +++ b/src/bin/dhcpclient.c @@ -194,7 +194,7 @@ static int request_init(fr_packet_t **out, fr_pair_list_t *packet_vps, char cons * Fill in the packet header from attributes, and then * re-realize the attributes. */ - fr_packet_pairs_to_packet(packet, packet_vps); + fr_packet_net_from_pairs(packet, packet_vps); if (fp != stdin) fclose(fp); diff --git a/src/bin/radclient-ng.c b/src/bin/radclient-ng.c index 4f48d5d9dfd..d10db83f18f 100644 --- a/src/bin/radclient-ng.c +++ b/src/bin/radclient-ng.c @@ -687,7 +687,7 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files) * Fill in the packet header from attributes, and then * re-realize the attributes. */ - fr_packet_pairs_to_packet(request->packet, &request->request_pairs); + fr_packet_net_from_pairs(request->packet, &request->request_pairs); /* * Default to the filename diff --git a/src/bin/radclient.c b/src/bin/radclient.c index ee12c0a57a5..a3f89af0782 100644 --- a/src/bin/radclient.c +++ b/src/bin/radclient.c @@ -668,7 +668,7 @@ static int radclient_init(TALLOC_CTX *ctx, rc_file_pair_t *files) * Fill in the packet header from attributes, and then * re-realize the attributes. */ - fr_packet_pairs_to_packet(request->packet, &request->request_pairs); + fr_packet_net_from_pairs(request->packet, &request->request_pairs); /* * Default to the filename diff --git a/src/bin/unit_test_module.c b/src/bin/unit_test_module.c index ef6d679d148..c36d919f3fc 100644 --- a/src/bin/unit_test_module.c +++ b/src/bin/unit_test_module.c @@ -289,7 +289,7 @@ static request_t *request_from_file(TALLOC_CTX *ctx, FILE *fp, fr_client_t *clie vp = fr_pair_find_by_da(&request->request_pairs, NULL, attr_packet_type); if (vp) request->packet->code = vp->vp_uint32; - fr_packet_pairs_to_packet(request->packet, &request->request_pairs); + fr_packet_net_from_pairs(request->packet, &request->request_pairs); /* * The input might have updated only some of the Net.* diff --git a/src/lib/server/packet.c b/src/lib/server/packet.c index 4dc2b7d7b70..5a66a58568a 100644 --- a/src/lib/server/packet.c +++ b/src/lib/server/packet.c @@ -136,7 +136,7 @@ static void pairs2inet(fr_ipaddr_t *ipaddr, uint16_t *port, fr_pair_list_t const * @param packet the packet to send * @param list the list to check for Net.* */ -void fr_packet_pairs_to_packet(fr_packet_t *packet, fr_pair_list_t const *list) +void fr_packet_net_from_pairs(fr_packet_t *packet, fr_pair_list_t const *list) { fr_pair_t *net, *tlv; diff --git a/src/lib/server/packet.h b/src/lib/server/packet.h index 3ef57fdc37e..aa2b3d4b31c 100644 --- a/src/lib/server/packet.h +++ b/src/lib/server/packet.h @@ -31,7 +31,7 @@ extern "C" { #include int fr_packet_pairs_from_packet(TALLOC_CTX *ctx, fr_pair_list_t *list, fr_packet_t const *packet) CC_HINT(nonnull); -void fr_packet_pairs_to_packet(fr_packet_t *packet, fr_pair_list_t const *list) CC_HINT(nonnull); +void fr_packet_net_from_pairs(fr_packet_t *packet, fr_pair_list_t const *list) CC_HINT(nonnull); int packet_global_init(void); diff --git a/src/listen/arp/proto_arp.c b/src/listen/arp/proto_arp.c index 324a6b621fd..714962d09bf 100644 --- a/src/listen/arp/proto_arp.c +++ b/src/listen/arp/proto_arp.c @@ -136,7 +136,7 @@ static ssize_t mod_encode(void const *instance, request_t *request, uint8_t *buf RDEBUG("WARNING: Sender-Hardware-Address of zeros will likely cause problems"); } - fr_packet_pairs_to_packet(request->reply, &request->reply_pairs); + fr_packet_net_from_pairs(request->reply, &request->reply_pairs); if (RDEBUG_ENABLED) { RDEBUG("Sending %d via socket %s", diff --git a/src/listen/bfd/proto_bfd.c b/src/listen/bfd/proto_bfd.c index b1b6863d4f6..48659d2af3a 100644 --- a/src/listen/bfd/proto_bfd.c +++ b/src/listen/bfd/proto_bfd.c @@ -251,7 +251,7 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 client = address->radclient; fr_assert(client); - fr_packet_pairs_to_packet(request->reply, &request->reply_pairs); + fr_packet_net_from_pairs(request->reply, &request->reply_pairs); /* * Dynamic client stuff diff --git a/src/listen/dns/proto_dns.c b/src/listen/dns/proto_dns.c index 82c1e652972..0ee7f7e6adb 100644 --- a/src/listen/dns/proto_dns.c +++ b/src/listen/dns/proto_dns.c @@ -245,7 +245,7 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 RHEXDUMP3(buffer, data_len, "proto_dns encode packet"); - fr_packet_pairs_to_packet(request->reply, &request->reply_pairs); + fr_packet_net_from_pairs(request->reply, &request->reply_pairs); return data_len; } diff --git a/src/listen/radius/proto_radius.c b/src/listen/radius/proto_radius.c index fe59d5fc1a0..e985a6a9425 100644 --- a/src/listen/radius/proto_radius.c +++ b/src/listen/radius/proto_radius.c @@ -297,7 +297,7 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 fr_io_track_t *track = talloc_get_type_abort(request->async->packet_ctx, fr_io_track_t); fr_io_address_t const *address = track->address; ssize_t data_len; - fr_client_t const *client; + fr_client_t const *client; /* * Process layer NAK, or "Do not respond". @@ -374,7 +374,7 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 return -1; } - fr_packet_pairs_to_packet(request->reply, &request->reply_pairs); + fr_packet_net_from_pairs(request->reply, &request->reply_pairs); if (RDEBUG_ENABLED) { RDEBUG("Sending %s ID %i from %pV:%i to %pV:%i length %zu via socket %s", diff --git a/src/listen/vmps/proto_vmps.c b/src/listen/vmps/proto_vmps.c index ae17cda7797..63b20e42d06 100644 --- a/src/listen/vmps/proto_vmps.c +++ b/src/listen/vmps/proto_vmps.c @@ -270,7 +270,7 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 return -1; } - fr_packet_pairs_to_packet(request->reply, &request->reply_pairs); + fr_packet_net_from_pairs(request->reply, &request->reply_pairs); RHEXDUMP3(buffer, data_len, "proto_vmps encode packet");