]> granicus.if.org Git - pdns/commitdiff
when making a netmask from a comboaddress, we neglected to zero the port. This could...
authorbert hubert <bert.hubert@powerdns.com>
Thu, 15 Jun 2017 01:14:01 +0000 (03:14 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 3 Jul 2017 10:07:40 +0000 (12:07 +0200)
(cherry picked from commit 0bdabe94e6fd873455d34b88f8954d8cc6034a72)

pdns/iputils.hh

index db2f0bd710901d808aabb6d3de1a7a10b1c852af..9a2414fc1410c51fe2896cb53e5eb14757000313 100644 (file)
@@ -313,7 +313,7 @@ public:
   Netmask(const ComboAddress& network, uint8_t bits=0xff)
   {
     d_network = network;
-    
+    d_network.sin4.sin_port=0;
     if(bits > 128)
       bits = (network.sin4.sin_family == AF_INET) ? 32 : 128;