This commit adds a new test case to the
test_zebra_seg6local_route topotest. The new test case performs two
operations:
* try to install a seg6local route with an End.DT46 action
* verify that the route is created correctly
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
"seg6local": { "action": "End.DX4" }
}]
}]
+ },
+ {
+ "in": {
+ "dest": "5::1",
+ "context": "End_DT46 10"
+ },
+ "out":[{
+ "prefix":"5::1/128",
+ "protocol":"sharp",
+ "selected":true,
+ "destSelected":true,
+ "distance":150,
+ "metric":0,
+ "installed":true,
+ "table":254,
+ "nexthops":[{
+ "flags":3,
+ "fib":true,
+ "active":true,
+ "directlyConnected":true,
+ "interfaceName": "dum0",
+ "seg6local": { "action": "End.DT46" }
+ }]
+ }],
+ "required_kernel": "5.14"
}
]
ip link add dum0 type dummy
ip link set dum0 up
+ip link add vrf10 type vrf table 10
+ip link set vrf10 up
sysctl -w net.ipv6.conf.dum0.disable_ipv6=0
+sysctl -w net.vrf.strict_mode=1
from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
from lib.topolog import logger
+from lib.common_config import required_linux_kernel_version
pytestmark = [pytest.mark.sharpd]
logger.info("CHECK {} {}".format(dest, context))
+ if manifest.get("required_kernel") is not None:
+ if required_linux_kernel_version(manifest["required_kernel"]) is not True:
+ logger.info(
+ "Kernel requirements are not met. Skipping {} {}".format(
+ dest, context
+ )
+ )
+ continue
+
r1.vtysh_cmd(
"sharp install seg6local-routes {} nexthop-seg6local dum0 {} 1".format(
dest, context