Skip to content

Commit

Permalink
topotests: fix ignore routes with linkdown
Browse files Browse the repository at this point in the history
In topotest, a given interface has only the ignore routes bit turned
on for IPv6 only, whereas topotest is expected to turn it on for all
address families.

> # show interface
> Interface r2-r3-eth2 is up, line protocol is up
> [..]
>  flags: <UP,BROADCAST,RUNNING,MULTICAST>
>  Ignore all v6 routes with linkdown
>  Type: Ethernet
>  [..]

This is because the only the 'default' ipv6 ignore sysctl is set to
1. Use the /proc/sys/net/conf/<family>/default/ignore_routes_with_linkdown
flag instead, to have same behaviour for ipv4 and ipv6.

Fixes: 4958158 ("tests: micronet: update infra")

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Mar 28, 2024
1 parent 4f50119 commit 51bfbe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/topotests/lib/topotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,8 +1318,8 @@ def fix_netns_limits(ns):
if version_cmp(platform.release(), "4.20") >= 0:
sysctl_assure(ns, "net.ipv6.route.skip_notify_on_dev_down", 1)

sysctl_assure(ns, "net.ipv4.conf.all.ignore_routes_with_linkdown", 1)
sysctl_assure(ns, "net.ipv6.conf.all.ignore_routes_with_linkdown", 1)
sysctl_assure(ns, "net.ipv4.conf.default.ignore_routes_with_linkdown", 1)
sysctl_assure(ns, "net.ipv6.conf.default.ignore_routes_with_linkdown", 1)

# igmp
sysctl_atleast(ns, "net.ipv4.igmp_max_memberships", 1000)
Expand Down

0 comments on commit 51bfbe3

Please sign in to comment.