Skip to content

Fix ospfv2 and ospfv3 running simultaneously - #1701

Merged
saba8814 merged 2 commits into
mainfrom
fix-ospfv2-and-ospfv3-running-simultaneously
Oct 13, 2026
Merged

saba8814 merged 2 commits into
mainfrom
fix-ospfv2-and-ospfv3-running-simultaneously

Conversation

@saba8814

Copy link
Copy Markdown
Collaborator

Description

When OSPFv2 and OSPFv3 ran at the same time, the OSPFv3 status replaced
the OSPFv2 status in the operational datastore, so show ip ospf said
OSPF was not running. yanger now appends both instances to the
control-plane-protocol list instead of overwriting it.

Adds a regression test, routing/dual_stack, that runs OSPFv2 with
OSPFv3 and RIPv2 with RIPng on the same link and checks that each
instance reports its neighbor.

No bugfix entry in ChangeLog.md since this has not been released yet.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

With both OSPFv2 and OSPFv3 enabled, the OSPFv2 instance was listed in
the operational datastore with only its type and name, and `show ip
ospf` said OSPF was not running.  add_areas() and add_areas6() each set
the control-plane-protocol list with insert(), which assigns, so the
OSPFv3 entry replaced the OSPFv2 one.  Append to the list instead, as
the RIP and RIPng code already does.

Resolves: #1700
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
@saba8814 saba8814 added the ci:main Build default defconfig, not minimal label Oct 13, 2026

@troglobit troglobit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but please try to make the text in the topology.svg file more readable. Currently it overlaps with the nodes and is squashed together. May be as simple as separating the nodes more on the Y axis.

I'm approving it anyway and you can set ci:skip when you've fixed this, and merge directly.

Nice work, and finding this!

The operational status of one routing protocol instance must not hide
the other when the IPv4 and IPv6 versions run on the same link.  One
test, run once for OSPF and once for RIP, configures both versions on
R1 and R2 and waits for the neighbor in each instance, read from the
operational datastore.  Without the statd fix the OSPFv2 adjacency is
never found and the OSPF run times out.

Add rip_has_neighbors() to infamy.route.  RIPng peers are only known by
their link-local address, so it checks that the instance has a
neighbor rather than matching one.

Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
@saba8814
saba8814 force-pushed the fix-ospfv2-and-ospfv3-running-simultaneously branch from a80b95c to 641ac44 Compare October 13, 2026 12:00
@saba8814 saba8814 added ci:skip Skip CI for this PR, started jobs are stopped. and removed ci:main Build default defconfig, not minimal labels Oct 13, 2026
@saba8814
saba8814 merged commit 2c076b3 into main Oct 13, 2026
12 of 13 checks passed
@saba8814
saba8814 deleted the fix-ospfv2-and-ospfv3-running-simultaneously branch October 13, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip Skip CI for this PR, started jobs are stopped.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants