Re: [ipset] Can't resolve domain names containing an hyphen "-"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 2025-08-22 17:52, Pierre Mazière wrote:
>--------------------------------------------------------------
># ipset create testset hash:ip
># ipset add testset hyphen-containing.example.com
>ipset v7.2x: Syntax error: cannot parse hyphen: resolving to IPv4 address failed
>----------------------------------------------------------------
>
>The issue seems to be located in the parse_ipaddr function of
>lib/parse.c: the function attempts to find if the string pointed by the str 
>argument is a range of IPs containing IPSET_RANGE_SEPARATOR defined in 
>include/libipset/parse.h as "-".
>If IPSET_RANGE_SEPARATOR is found, it is replaced by '\0' which results
>in the truncation of the string pointed by the str argument.

And this is well documented in the manpage.

       If host names or service names with dash in the name are used instead of
       IP addresses or service numbers, then the host name or service name must
       be enclosed in square brackets.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux