IPv6 rules retrieval using IPDB

22 views
Skip to first unread message

Ragan Gidde

unread,
Jul 25, 2017, 8:45:51 AM7/25/17
to pyroute2-dev
Hi,

How to retrieve the IPv6 rules using IPDB. I have used API like as follows, seems it is displaying only IPv4 rules.

>>> from pyroute2 import IPDB
>>> ip=IPDB()
>>> ip.rules
{RuleKey(action=1, table=253, priority=32767, iifname=0, oifname=0, fwmark=0, fwmask=0, goto=0, tun_id=0): {'family': 2, 'tos': 0, 'priority': 32767, 'flags': 0, 'action': 1, 'table': 253, 'ipdb_priority': 0, 'ipdb_scope': 'system'}, RuleKey(action=1, table=254, priority=32766, iifname=0, oifname=0, fwmark=0, fwmask=0, goto=0, tun_id=0): {'family': 2, 'tos': 0, 'priority': 32766, 'flags': 0, 'action': 1, 'table': 254, 'ipdb_priority': 0, 'ipdb_scope': 'system'}, RuleKey(action=1, table=123, priority=32001, iifname=0, oifname=0, fwmark=0, fwmask=0, goto=0, tun_id=0): {'src': '192.168.12.0/24', 'family': 2, 'tos': 0, 'priority': 32001, 'flags': 0, 'action': 1, 'table': 123, 'ipdb_priority': 0, 'ipdb_scope': 'system'}, RuleKey(action=1, table=255, priority=0, iifname=0, oifname=0, fwmark=0, fwmask=0, goto=0, tun_id=0): {'family': 2, 'tos': 0, 'flags': 0, 'action': 1, 'table': 255, 'ipdb_priority': 0, 'ipdb_scope': 'system'}}

Thanks & Regards,
Ragan.

Peter Saveliev

unread,
Jul 25, 2017, 10:22:47 AM7/25/17
to Ragan Gidde, pyroute2-dev
The rules support in IPDB is very limited, and IPv6 rules aren't supported yet. There are some other issues, e.g. with rule keys. Pls wait for a week, I plan to roll out a bit improved code.

--
You received this message because you are subscribed to the Google Groups "pyroute2-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages