Skip to content

fix: send default OSPF auth key ID (127) when authentication is disabled - #870

Open
ccoueffe wants to merge 1 commit into
netascode:developfrom
ccoueffe:fix/fabric_ospf_authentication
Open

fix: send default OSPF auth key ID (127) when authentication is disabled#870
ccoueffe wants to merge 1 commit into
netascode:developfrom
ccoueffe:fix/fabric_ospf_authentication

Conversation

@ccoueffe

@ccoueffe ccoueffe commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Fixes #869

Related Collection Role

  • cisco.nac_dc_vxlan.validate
  • cisco.nac_dc_vxlan.dtc.create
  • cisco.nac_dc_vxlan.dtc.deploy
  • cisco.nac_dc_vxlan.dtc.remove
  • other

Related Data Model Element

  • vxlan.fabric
  • vxlan.global
  • vxlan.topology
  • vxlan.underlay
  • vxlan.overlay
  • vxlan.overlay_extensions
  • vxlan.policy
  • vxlan.multisite
  • defaults.vxlan
  • other

Proposed Changes

When ospf.authentication_enable: false, NDFC rejects any OSPF_AUTH_KEY_ID value other than empty or 127. Previously the template always sent the user-provided key ID, causing fabric update failures when auth was disabled but a key ID was defined in the data model.

Template fix (dc_vxlan_fabric_protocols.j2)

Condition Before After
authentication_enable: true Sends user key ID + key Sends user key ID + key (unchanged)
authentication_enable: false Sends user key ID (fails if != 127) Sends default key ID (127 from defaults)

The else branch now explicitly sends the default OSPF_AUTH_KEY_ID (127) when authentication is disabled. This is safe because:

  • 127 is the NDFC default value for OSPF_AUTH_KEY_ID in the dcnm_fabric module
  • 127 is accepted by NDFC in all scenarios (fresh fabric, previously enabled then disabled)
  • OSPF_AUTH_KEY is not sent when auth is disabled (omitted from payload)

Data Model Example

vxlan:
  underlay:
    ospf:
      area_id: 0.0.0.0
      authentication_enable: false    # auth disabled
      authentication_key_id: 10       # ignored — template sends 127 instead
      authentication_key: my_key      # ignored — not sent to NDFC

Test Notes

Tested with:

  • Fresh fabric with auth disabled → ✅ deploys cleanly
  • Fabric with auth previously enabled then disabled → ✅ OSPF_AUTH_KEY_ID=127 accepted
  • Fabric with auth enabled → ✅ user key ID sent as before

Cisco Nexus Dashboard Version

12.4.1

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@ccoueffe ccoueffe changed the title Update dc_vxlan_fabric_protocols.j2 fix: send default OSPF auth key ID (127) when authentication is disabled Aug 12, 2026
@ccoueffe
ccoueffe marked this pull request as ready for review August 12, 2026 09:25
@ccoueffe
ccoueffe requested a review from a team as a code owner August 12, 2026 09:25
@ccoueffe ccoueffe self-assigned this Aug 12, 2026
@ccoueffe ccoueffe added bug Something isn't working ready for review PR Ready for Review 0.9.0 Release 0.9.0 labels Aug 12, 2026
@ccoueffe
ccoueffe requested a review from juburnet August 12, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.9.0 Release 0.9.0 bug Something isn't working ready for review PR Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OSPF auth key ID causes fabric update failure when authentication is disabled

1 participant