]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Fix Message ednsflags propery setter.
authorBrian Wellington <bwelling@xbill.org>
Tue, 7 Jul 2020 20:42:48 +0000 (13:42 -0700)
committerBrian Wellington <bwelling@xbill.org>
Tue, 7 Jul 2020 20:42:48 +0000 (13:42 -0700)
Setting ednsflags to 0 shouldn't unconditionally enable EDNS.

dns/message.py

index 1bb02ae23a2e8029e0741bfd0f0d66840dd8839b..60b74c19ec9053f5c78eb41f8a13e49d6b284aab 100644 (file)
@@ -614,7 +614,7 @@ class Message:
     def ednsflags(self, v):
         if self.opt:
             self.opt.ttl = v
-        else:
+        elif v:
             self.opt = self._make_opt(v)
 
     @property