svinota/cxnet — Issue #4: support IPv6-enabled systems
Author: Finkregh
Created: 2011-10-31 13:55:10+00:00
State: open

having ipv6-addresses enabled causes e.g. ```get_route``` to break:

```python
In [4]: iproute2.get_route("8.8.8.8")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)

in ()

cxnet/cxnet/netlink/iproute2.py in get_route(self, addr, table)
330 for i in ret:
331 if ('dst_prefix' in i.keys()) and ('dst_len' in i.keys()):
--> 332 if dqn_to_int(i['dst_prefix']) == get_base(dst,i['dst_len']):
333 result['static'] = i
334 elif ('dst_len' in i.keys()) and ('src_len' in i.keys()):

cxnet/cxnet/utils.py in dqn_to_int(st)
209 # not extensible at all, but that works faster

210 ###

--> 211 return int("%02x%02x%02x%02x" % (int(st[0]),int(st[1]),int(st[2]),int(st[3])),16)
212
213 def int_to_dqn(st):

ValueError: invalid literal for int() with base 10: '201:foo:bar:02:00:00:00:01'
```