#1 bugfix for ip/network stuff

closed-fixed
nobody
None
5
2004-01-15
2004-01-14
Stefan Bambach
No

Hi Basti,

really the first patch ?

1.) If filtered or allowed by adress/network, die "ip"
is stored as (long) number. wenn loading this number it
will not be recognized as ip adress any more.
corresponding to strhosts2map the map2hosts method will
be convert the ip-number back to AAA.BBB.CCC.DDD
format. So the load and save configfile will result to
the same data now and the configuration will be working
after webcleaner stop/start now.

2.) network masks were wrong: a netmask "/24" means the
LEFT 24 bits are left as is and the right 8 will be set
to 0. You deleted the right 24 bits. So a
192.168.2.1/24 will get 192.0.0.0 instead of
192.168.2.0 :-(

fixed:
id.py: mask2suffix and suffix2mask fixed for correct
network filter
id.py: map2hosts, does not convert the ip adress to
string (98798172987 -> AAA.BBB.CCC.DDD)

ciao. Stefan Bambach ;-)

Discussion

  • Wummel
    Wummel
    2004-01-15

    • status: open --> closed-fixed
     
  • Wummel
    Wummel
    2004-01-15

    Logged In: YES
    user_id=9205

    This is fixed in wc/ip.py, rev. 1.15 and will be in the next
    release. Thanks!