Closed
Description
When removing all IPs from an interface, Linux removes all routes associated with that interfaces. NDB does not recognize this and loses sync when trying to remove one of the previously associated routes.
Steps to reproduce
import pyroute2
ndb = pyroute2.NDB()
interface = ndb.interfaces.create(ifname='test', kind='bridge')
interface.set('state', 'up').commit()
interface.add_ip('10.0.0.1/32').commit()
ndb.routes.create(dst='10.0.0.2/32', oif=interface['index']).commit()
interface.del_ip('10.0.0.1/32').commit()
ndb.routes['10.0.0.2/32'].remove().commit()
Running the above script hangs for a while and finally terminates with Exception: lost sync in apply()
.
Activity