From c618c204177a32359dffba5f35be97b07fc8b164 Mon Sep 17 00:00:00 2001 From: "Marikkannu, Suresh" Date: Sun, 1 Dec 2024 23:14:35 -0800 Subject: [PATCH] Update route ctl logic to exclude IPV6 route entries 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):