X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=regression-tests.dnsdist%2Fclientsubnetoption.py;h=79deb2c98d3dbea195a5ea4cb94d26611ee1a656;hb=b61cf2574a1c5b668375cf75e41ab64ce028dc01;hp=5306985288fa3f82d8a4c3914bf57a77bd8f618f;hpb=72a027eacb3b3637da32f3e6c2ea0ecfa2c18990;p=thirdparty%2Fpdns.git diff --git a/regression-tests.dnsdist/clientsubnetoption.py b/regression-tests.dnsdist/clientsubnetoption.py index 5306985288..79deb2c98d 100644 --- a/regression-tests.dnsdist/clientsubnetoption.py +++ b/regression-tests.dnsdist/clientsubnetoption.py @@ -58,7 +58,7 @@ class ClientSubnetOption(dns.edns.Option): """Implementation of draft-vandergaast-edns-client-subnet-01. Attributes: - family: An integer inidicating which address family is being sent + family: An integer indicating which address family is being sent ip: IP address in integer notation mask: An integer representing the number of relevant bits being sent scope: An integer representing the number of significant bits used by @@ -126,7 +126,7 @@ class ClientSubnetOption(dns.edns.Option): return self.option == DRAFT_OPTION_CODE def to_wire(self, file): - """Create EDNS packet as definied in draft-vandergaast-edns-client-subnet-01.""" + """Create EDNS packet as defined in draft-vandergaast-edns-client-subnet-01.""" ip = self.calculate_ip() @@ -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.