Re: Error: an inet prefix is expected rather than "0/0".

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Stephen Hemminger <shemminger@...>
Cc: Herbert Xu <herbert@...>, Krzysztof Oledzki <ole@...>, <netdev@...>
Date: Tuesday, October 14, 2008 - 5:52 pm

Stephen Hemminger wrote:

We fixed the same problem in iptables a few years ago, maybe you could
reuse some of that code. Some quick testing shows that it parses all
addresses according to your table:

# iptables -I OUTPUT -d 127.2
# iptables -I OUTPUT -d 10.0
# iptables -I OUTPUT -d 10
# iptables -vxnL OUTPUT
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
     pkts      bytes target     prot opt in     out     source 
      destination
        0        0            all  --  *      *       0.0.0.0/0 
    10.0.0.0
        0        0            all  --  *      *       0.0.0.0/0 
    10.0.0.0
        0        0            all  --  *      *       0.0.0.0/0 
    127.2.0.0

You can find the code in "xtables.c", function numeric_to_ipaddr().
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Error: an inet prefix is expected rather than "0/0"., Krzysztof Oledzki, (Wed Oct 8, 5:05 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Krzysztof Oledzki, (Wed Oct 8, 5:32 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Stephen Hemminger, (Tue Oct 14, 1:46 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Krzysztof Halasa, (Wed Oct 15, 11:35 am)
Re: Error: an inet prefix is expected rather than "0/0"., Ben Hutchings, (Wed Oct 15, 12:07 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Krzysztof Halasa, (Wed Oct 15, 2:52 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Stephen Hemminger, (Mon Oct 27, 1:39 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Patrick McHardy, (Tue Oct 14, 5:52 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Patrick McHardy, (Tue Oct 14, 5:54 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Krzysztof Oledzki, (Tue Oct 14, 3:15 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Stephen Hemminger, (Tue Oct 14, 3:18 pm)
Re: Error: an inet prefix is expected rather than "0/0"., Ben Hutchings, (Tue Oct 14, 3:38 pm)