mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Decrease strictness of parsing IPv4 strings into addrs. (fixes #775)
IPv4 strings in dotted-decimal format with decimal parts containing leading zeroes now parse better.
This commit is contained in:
parent
1f7bfbb83c
commit
b66b74e5dc
4 changed files with 72 additions and 1 deletions
|
@ -261,6 +261,14 @@ public:
|
|||
|
||||
unsigned int MemoryAllocation() const { return padded_sizeof(*this); }
|
||||
|
||||
/**
|
||||
* Returns a canonicalized IPv4 dotted-decimal string such that
|
||||
* leading zeroes of each decimal part are removed.
|
||||
*
|
||||
* @param s String containing an IPv4 address in dotted-decimal notation.
|
||||
*/
|
||||
static std::string CanonIPv4(const std::string& s);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Initializes an address instance from a string representation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue