]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
error out on TCP / TLS home servers
authorAlan T. DeKok <aland@freeradius.org>
Mon, 20 Apr 2020 19:17:00 +0000 (15:17 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 20 Apr 2020 19:17:00 +0000 (15:17 -0400)
src/modules/rlm_replicate/rlm_replicate.c

index aaba1da136b3381d39aa2b48e0a6fea333d6adb5..def0d05dc102c3c4d690a2db44e34ac409a2c9b1 100644 (file)
@@ -114,6 +114,20 @@ static int replicate_packet(UNUSED void *instance, REQUEST *request, pair_lists_
                        continue;
                }
 
+#ifdef WITH_TCP
+               if (home->proto != IPPROTO_UDP) {
+                       REDEBUG("The replicate module only does UDP - Cannot send to TCP home_server %s", home->name);
+                       continue;
+               }
+#endif
+
+#ifdef WITH_TCP
+               if (home->tls) {
+                       REDEBUG("The replicate module only does UDP - Cannot send to TLS home_server %s", home->name);
+                       continue;
+               }
+#endif
+
                /*
                 *      For replication to multiple servers we re-use the packet
                 *      we built here.