• Italo Cunha's avatar
    Sort addresses in IPaddrSet · 39080516
    Italo Cunha authored
    Primary and secondary addresses depend on the order in which they
    are added to an interface [1] .  This commit makes pyroute2 add IP
    addresses in the same order Interface.add_ip is called.
    
    This is achieved by changing LinkedSet.raw from a plain dict to an
    OrderedDict and by reimplementing the set operators to preserve
    ordering.
    
     [1] iproute2 docs: http://baturin.org/docs/iproute2/#Notes
    39080516
linkedset.py 8.95 KB