You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Why routes are not deleted in the ipdb module when the interface is down. For example:
pc@user:~$ sudo ip route add 8.8.8.8 via 10.10.3.1 dev enp3s0 table 205
pc@user:~$ ip route show table 205
8.8.8.8 via 10.10.3.1 dev enp3s0 linkdown
pc@user:~$
associated with the RTM_DELLINK event. But RTM_DELLINK is raised only when interfaces are deleted, not turned off. Is it possible add the following method:
def gc_mark_down(self, msg):
if msg['family'] != 0 or msg['state'] != 'down':
return
for record in self.filter({'oif': msg['index']}):
with record['route']._direct_state:
record['route']['ipdb_scope'] = 'gc'
record['route']._gctime = time.time()
for record in self.filter({'iif': msg['index']}):
with record['route']._direct_state:
record['route']['ipdb_scope'] = 'gc'
record['route']._gctime = time.time()
and bind it to event RTM_NEWLINK ?
The text was updated successfully, but these errors were encountered:
the route method returns routes from main table, so possible invalid routes will be restored.
Looks like you need to do an additional check here.
Something like this:
if not self.ipdb.nl.route('dump', **route['route']):
raise
Hello. Why routes are not deleted in the ipdb module when the interface is down. For example:
The RoutingTableSet class has method:
pyroute2/pyroute2/ipdb/routes.py
Line 1219 in 6b56aa2
associated with the RTM_DELLINK event. But RTM_DELLINK is raised only when interfaces are deleted, not turned off. Is it possible add the following method:
and bind it to event RTM_NEWLINK ?
The text was updated successfully, but these errors were encountered: