From 4b6033e8da98ad5335d2543472242f3285aad3fa Mon Sep 17 00:00:00 2001 From: sureshmarikkannu <115574144+sureshmarikkannu@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:45:49 +0530 Subject: [PATCH] Update route ctl logic to exclude IPV6 route entries (#868) Signed-off-by: Marikkannu, Suresh --- conf/route_control.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/route_control.py b/conf/route_control.py index bc7ea59ab..691ef25b9 100755 --- a/conf/route_control.py +++ b/conf/route_control.py @@ -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) @@ -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):