]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
If a client requests a UDP buffer of less than 512, ignore it. [RT #1197]
authorAndreas Gustafsson <source@isc.org>
Thu, 19 Apr 2001 18:54:51 +0000 (18:54 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 19 Apr 2001 18:54:51 +0000 (18:54 +0000)
bin/named/client.c

index 295cc51e3b41b02980298620cc27beccef19c790..b1939aaa67e86816a3752db49cba3810eb956f2e 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: client.c,v 1.136.2.4 2001/02/23 02:27:25 gson Exp $ */
+/* $Id: client.c,v 1.136.2.5 2001/04/19 18:54:51 gson Exp $ */
 
 #include <config.h>
 
@@ -1251,6 +1251,13 @@ client_request(isc_task_t *task, isc_event_t *event) {
                 */
                client->udpsize = opt->rdclass;
 
+               /*
+                * If the requested UDP buffer size is less than 512,
+                * ignore it and use 512.
+                */
+               if (client->udpsize < 512)
+                       client->udpsize = 512;
+
 #ifdef DNS_OPT_NEWCODES
                /*
                 * Get the flags out of the OPT record.