lib/spf/model.rb in spf-0.0.11 vs lib/spf/model.rb in spf-0.0.12

- old
+ new

@@ -422,13 +422,13 @@ self.parse_ipv4_network(required) @ip_netblocks << @ip_network end def params - result = @ip_network.addr - if @ip_network.masklen != @default_ipv4_prefix_length - result += "/#{@ip_network.masklen}" + result = @ip_network.to_addr + if @ip_network.pfxlen != @default_ipv4_prefix_length + result += "/#{@ip_network.pfxlen}" end return result end def match(server, request, want_result = true) @@ -449,11 +449,11 @@ @ip_netblocks << @ip_network end def params params = ':' + @ip_network.short - params += '/' + @ip_network.masklen if - @ip_network.masklen != DEFAULT_IPV6_PREFIX_LENGTH + params += '/' + @ip_network.pfxlen if + @ip_network.pfxlen != DEFAULT_IPV6_PREFIX_LENGTH return params end def match(server, request, want_result = true) return @ip_network.contains?(request.ip_address_v6)