-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ospfd: Correct LSA parser which fulfill the TED #15026
Conversation
Traffic Engineering Database (TED) is fulfill from the various LSA advertised and received by the router. To remove information on the TED, 2 mechanisms are used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of prefixes advertised in the Router LSA with the list of corresponding edges and subnets contained in the TED. However, this second mechanism assumes that the Router LSA is unique and contains all prefixes of the advertised router. But, this is wrong. Prefixes could be advertised with several Router LSA. This conduct to remove edge and subnet in the TED while it should be maintained. The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy loaded. This simple patch removed deletion of edges and subnets when parsing the Router LSA and only removed them when the corresponding TE Opaque LSA is flushed. In addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This patch also correct this second problem. Signed-off-by: Olivier Dugeon <[email protected]>
The OSPF TE topotest is using switches to interconnect router. During the test, interfaces are shutdown on some routers to simulate link failure and check that the TED is correctly updated. However, the switche between router avoid the detection by the neighbor router that the interface is down i.e. the interface line remains up as it is conneted to the switch and not to the router. This patch update the tested topology by removing the switch and connect directly the router excepted the inter AS link on R3. Interface are also renamed accordingly. Signed-off-by: Olivier Dugeon <[email protected]>
@Mergifyio backport stable/9.1 stable/9.0 |
✅ Backports have been created
|
ospfd: Correct LSA parser which fulfill the TED (backport #15026)
ospfd: Correct LSA parser which fulfill the TED (backport #15026)
switch = tgen.add_switch("s2") | ||
switch.add_link(tgen.gears["r1"]) | ||
switch.add_link(tgen.gears["r2"]) | ||
tgen.add_link(r1, r2, ifname1="eth0", ifname2="eth0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you continue to use the r1-eth0
, r2-eth0
naming scheme rather than removing the rX-
prefix? If you do that here and below, then none of the config files need to change and this PR gets a lot smaller -- from 10 files changed to 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what are the default names assigned if you don't specify the ifname[12]
keywords?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first intention was to keep the interface name. Unfortunately, if you set the ifname1 & 2 with ifname1="r1-eth0"
for example, pytest crash with an error about the name of the interface. I don't try to not specify the ifname[12]
keyword, but it seems that the default value will not be of the form rX-ethY
Traffic Engineering Database (TED) is fulfill from the various LSA advertised and received by the router. To remove information on the TED, 2 mechanisms are used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of prefixes advertised in the Router LSA with the list of corresponding edges and subnets contained in the TED. However, this second mechanism assumes that the Router LSA is unique and contains all prefixes of the advertised router. But, this is wrong. Prefixes could be advertised with several Router LSA. This conduct to remove edge and subnet in the TED while it should be maintained. The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy loaded.
This simple patch removed deletion of edges and subnets when parsing the Router LSA and only removed them when the corresponding TE Opaque LSA is flushed. In addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This patch also correct this second problem.
As consequence, the OSPF TE topotest which is using switches to interconnect router has been updated to use direct interconnection between router. Indeed, during the test, interfaces are shutdown on some routers to simulate link failure and check that the TED is correctly updated. However, the switch between router avoid the detection by the neighbor router that the interface is down i.e. the interface line remains up as it is connected to the switch and not to the router.
This PR solve the issue #14994