From bf953169dc24d1e9bfe7805a7530a8347c24fab4 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sun, 28 Jun 2020 18:53:20 -0700 Subject: [PATCH] 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. --- dns/message.py | 2 -- 1 file changed, 2 deletions(-) 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. -- 2.47.3