Skip to content

Commit

Permalink
Update route ctl logic to exclude IPV6 route entries
Browse files Browse the repository at this point in the history
Signed-off-by: Marikkannu, Suresh <[email protected]>
  • Loading branch information
sureshmarikkannu committed Dec 2, 2024
1 parent 430f255 commit c618c20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conf/route_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from pybess.bess import *
from pyroute2 import NDB, IPRoute
from scapy.all import ICMP, IP, send
from socket import AF_INET

LOG_FORMAT = "%(asctime)s %(levelname)s %(message)s"
logging.basicConfig(format=LOG_FORMAT, level=logging.INFO)
Expand Down Expand Up @@ -365,7 +366,7 @@ def start_pinging_missing_entries(self) -> None:

def bootstrap_routes(self) -> None:
"""Goes through all routes and handles new ones."""
routes = self._ipr.get_routes()
routes = self._ipr.get_routes(family=AF_INET)
for route in routes:
if route["event"] == KEY_NEW_ROUTE_ACTION:
if route_entry := self._parse_route_entry_msg(route):
Expand Down

0 comments on commit c618c20

Please sign in to comment.