From: Bob Halley Date: Mon, 29 Jun 2020 01:53:20 +0000 (-0700) Subject: Remove no longer needed code to activate EDNS if setting an extended X-Git-Tag: v2.0.0rc2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf953169dc24d1e9bfe7805a7530a8347c24fab4;p=thirdparty%2Fdnspython.git Remove no longer needed code to activate EDNS if setting an extended rcode and EDNS has not previously been activated. The code is no longer needed as setting ednsflags to a nonzero value will automatically make an opt RR and enable EDNS. --- diff --git a/dns/message.py b/dns/message.py index 0f4a4012..cc1de46f 100644 --- a/dns/message.py +++ b/dns/message.py @@ -624,8 +624,6 @@ class Message: self.flags |= value self.ednsflags &= 0x00FFFFFF self.ednsflags |= evalue - if self.ednsflags != 0 and self.edns < 0: - self.edns = 0 def opcode(self): """Return the opcode.