FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.34k stars 1.25k forks source link

OSPF flood-reduce rfc4136: implementation error for DO_NOT_AGE #14007

Closed dl001 closed 9 months ago

dl001 commented 1 year ago

Describe the bug

The OSPF flood-reduce implementation by rfc4136 contains an error.

For implementation using flag DO_NOT_AGE in field ls_age. Macros CHECK_FLAG(_->ls_age, DO_NOT_AGE), SETFLAG(->ls_age, DO_NOT_AGE) are used for this. BUT field ls_age - have network byte order. As a result, macros are triggered incorrectly.

To Reproduce

Any worked OSPF router with any configuration.

noc-srr01# sh ver
FRRouting 9.0-dev

No any flood-reduce enabled or configured.

noc-srr01# sh ip ospf
 OSPF Routing Process, Router ID: 10.169.240.93
 Supports only single TOS (TOS0) routes
 This implementation conforms to RFC2328
 RFC1583Compatibility flag is enabled
 OpaqueCapability flag is disabled
 Initial SPF scheduling delay 0 millisec(s)
 Minimum hold time between consecutive SPFs 50 millisec(s)
 Maximum hold time between consecutive SPFs 5000 millisec(s)
 Hold time multiplier is currently 2
 SPF algorithm last executed 10m00s ago
 Last SPF duration 0.023s
 SPF timer is inactive
 LSA minimum interval 5000 msecs
 LSA minimum arrival 1000 msecs
 Write Multiplier set to 20
 Refresh timer 10 secs
 Maximum multiple paths(ECMP) supported 64
 Administrative distance 110
 This router is an ABR, ABR type is: Alternative Cisco
 This router is an ASBR (injecting external routing information)
 Number of external LSA 12404. Checksum Sum 0x185ba81c
 Number of opaque AS LSA 0. Checksum Sum 0x00000000
 Number of areas attached to this router: 3
 All adjacency changes are logged
 Area ID: 0.0.0.0 (Backbone)
   Number of interfaces in this area: Total: 3, Active: 3
   Number of fully adjacent neighbors in this area: 4
   Area has simple password authentication
   SPF algorithm executed 142606 times
   Number of LSA 6721
   Number of router LSA 170. Checksum Sum 0x0056b43f
   Number of network LSA 73. Checksum Sum 0x0024f35e
   Number of summary LSA 6422. Checksum Sum 0x0c7191ef
   Number of ASBR summary LSA 56. Checksum Sum 0x00179d56
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000

 Area ID: 0.0.0.1 (Stub, no summary)
   Shortcutting mode: Default, S-bit consensus: no
   Number of interfaces in this area: Total: 2, Active: 2
   Number of fully adjacent neighbors in this area: 1
   Area has message digest authentication
   Number of full virtual adjacencies going through this area: 0
   SPF algorithm executed 142608 times
   Number of LSA 631
   Number of router LSA 313. Checksum Sum 0x0094708e
   Number of network LSA 310. Checksum Sum 0x009bf92f
   Number of summary LSA 8. Checksum Sum 0x00032258
   Number of ASBR summary LSA 0. Checksum Sum 0x00000000
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000

 Area ID: 0.0.0.2
   Shortcutting mode: Default, S-bit consensus: no
   Number of interfaces in this area: Total: 12, Active: 12
   Number of fully adjacent neighbors in this area: 11
   Area has message digest authentication
   Number of full virtual adjacencies going through this area: 0
   SPF algorithm executed 142607 times
   Number of LSA 1500
   Number of router LSA 12. Checksum Sum 0x00048c41
   Number of network LSA 11. Checksum Sum 0x0005d02a
   Number of summary LSA 1286. Checksum Sum 0x028ab50b
   Number of ASBR summary LSA 191. Checksum Sum 0x005e6a55
   Number of NSSA LSA 0. Checksum Sum 0x00000000
   Number of opaque link LSA 0. Checksum Sum 0x00000000
   Number of opaque area LSA 0. Checksum Sum 0x00000000

We get a lot of records DNA. We have a large network: 400 routers OSPF with tens thousand routes. 10-30 DNA records accumulate on the FRR-9.1-dev per day.

dl@noc-srr01:/home/dl# vtysh -c 'sh ip ospf database detail' | grep DNA | wc -l
     193

These are clearly mistaken DNA entries.

dl@noc-srr01:/home/dl# vtysh -c 'sh ip ospf database detail' | more
  LS age: 3600(S-DNA)
  Options: 0x2  : *|-|-|-|-|-|E|-
  LS Flags: 0xf
  LS Type: summary-LSA
  Link State ID: 10.168.0.84 (summary Network Number)
  Advertising Router: 10.169.240.93
  LS Seq Number: 800002dd
  Checksum: 0x8787
  Length: 28

  Network Mask: /32
        TOS: 0  Metric: 102

Versions

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

frrbot[bot] commented 9 months ago

This issue will be automatically closed in the specified period unless there is further activity.