From 5610fe2de61db949cd36a2977470d7f43c7d2943 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 3 Oct 2019 11:53:48 +0200 Subject: [PATCH] Implement python's to_text() for Cookies and Client Subnet options --- regression-tests.dnsdist/clientsubnetoption.py | 3 +++ regression-tests.dnsdist/cookiesoption.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/regression-tests.dnsdist/clientsubnetoption.py b/regression-tests.dnsdist/clientsubnetoption.py index c4f78f25d..79deb2c98 100644 --- a/regression-tests.dnsdist/clientsubnetoption.py +++ b/regression-tests.dnsdist/clientsubnetoption.py @@ -189,6 +189,9 @@ class ClientSubnetOption(dns.edns.Option): self.scope ) + def to_text(self): + return self.__repr__() + def __eq__(self, other): """Rich comparison method for equality. diff --git a/regression-tests.dnsdist/cookiesoption.py b/regression-tests.dnsdist/cookiesoption.py index 15ab1722f..6b9204b3e 100644 --- a/regression-tests.dnsdist/cookiesoption.py +++ b/regression-tests.dnsdist/cookiesoption.py @@ -57,6 +57,9 @@ class CookiesOption(dns.edns.Option): self.server ) + def to_text(self): + return self.__repr__() + def __eq__(self, other): if not isinstance(other, CookiesOption): return False -- 2.40.0