Skip to content

Commit

Permalink
Minor update to docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-forte-elastic committed Oct 26, 2023
1 parent 2665b08 commit 998de35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eql/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class CidrMatch(FunctionSignature):

# store it in native representation, then recover it in network order
masks = [struct.unpack(">L", struct.pack(">L", MAX_IP & ~(MAX_IP >> b)))[0] for b in range(33)]
mask_addresses4 = [socket.inet_ntoa(struct.pack(">L", m)) for m in masks]
mask_addresses = [socket.inet_ntoa(struct.pack(">L", m)) for m in masks]

# IPv6 masks
masks6 = [int("1" * i + "0" * (128 - i), 2) for i in range(129)]
Expand Down Expand Up @@ -279,7 +279,7 @@ def expand_ipv6_address(cls, ipv6_address):

@classmethod
def to_mask(cls, cidr_string):
"""Split an IPv4 address plus cidr block to the mask."""
"""Split an IPv4 or IPv6 address plus cidr block to the mask."""
ip_string, size = cidr_string.split("/")
size = int(size)
if cls.ip_compiled.match(ip_string):
Expand Down

0 comments on commit 998de35

Please sign in to comment.