This commit introduces the implementation for the north-bound
callbacks for the ospf6d-specific route-map match and set clauses.
Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
Signed-off-by: Sarita Patra <saritap@vmware.com>
When the ospf6 daemon goes down, it originates MAX_AGE
LSAs for all the self-originated LSAs so that it gets
flushed from the neighbor's database. But the link-LSAs
are not getting MAX_AGE.
Set the self-originated link-LSAs age to MAX_AGE and
flood it
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
Same as other commits -- convert most DEFINE_MTYPE into the _STATIC
variant, and move the remaining non-static ones to appropriate places.
Signed-off-by: David Lamparter <equinox@diac24.net>
Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet. Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition. And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...
With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.
Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.
Signed-off-by: David Lamparter <equinox@diac24.net>
The point of the `-std=gnu99` was to override a `-std=c99` that may be
coming in from net-snmp. However, we want C11, not C99.
Signed-off-by: David Lamparter <equinox@diac24.net>
When removing an interface from an existing area,
the warning message we get is not correct
interface r1-r2-eth0
ipv6 address 2013:12::1/64
ipv6 ospf6 dead-interval 4
ipv6 ospf6 hello-interval 1
!
interface dummy
ipv6 ospf6 dead-interval 4
ipv6 ospf6 hello-interval 1
ipv6 ospf6 network point-to-point
!
router ospf6
ospf6 router-id 1.1.1.1
interface r1-r2-eth0 area 0.0.0.0
!
r1(config-if)# router ospf6
r1(config-ospf6)# no interface dummy area 0.0.0.0
No such Area-ID: 0.0.0.0 <--- area 0.0.0.0 exists
This is fixing the error message
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
This bug was first reported in PR#7717. When removing an interface
from the area, the interface prefix is still shown
r1# sh ipv6 ospf6 interface prefix
*N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:12
r1# conf t
r1(config)# router ospf6
r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
r1(config-ospf6)# exit
r1# sh ipv6 ospf6 interface prefix
*N IA 2013:12::/64 ::1 r1-r2-eth0 00:00:22
This fix will check if the interface is disabled so the
prefix is not shown
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
In OSPFv3 when removing the interface from an area, all ospf6
interface commands are lost, so when changing the area you need
to reconfigure all ospf6 interface commands again
r1# sh run
interface r1-r2-eth0
ipv6 address 2013:12::1/64
ipv6 ospf6 dead-interval 4
ipv6 ospf6 hello-interval 1
ipv6 ospf6 network point-to-point
!
router ospf6
ospf6 router-id 1.1.1.1
interface r1-r2-eth0 area 0.0.0.0
!
r1# conf t
r1(config)# router ospf6
r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
r1(config-ospf6)# exit
r1# sh run
interface r1-r2-eth0
ipv6 address 2013:12::1/64
! <----- missing all ipv6 ospf6 commands
router ospf6
ospf6 router-id 1.1.1.1
!
This is because the interface is being deleted instead of disabled
(see PR#7717) I believe the interface should be left as disabled
(not deleted) when removing the interface from the area
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
When there are too many LSA updates to be sent in a packet the code needs to
correctly clear the locks that are taken while walking the lists and then wait
for the appropriate timer to expire to continue walking the list. The routine
that was being called would not properly remove all the locks that needed to be
cleared, and would also try to incorrectly delete the lsa/route. The code now
clears the locks and leaves the lsa on the list. When the timers fire again
the code continues walking the list to send the rest of the lsas to the
neighbor.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
If area is a normal area and has adjacencies up and then the user changes
the area to a stub area, the code was leaving existing AS-External LSAs in
the database and was sending AS-External LSAs into the stub area causing
the adjacency to stay in Ex-Start. With this change we now cleanup the
AS-External LSAs that existed when area was not a stub and do not advertise
AS-External LSAs into the stub area.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
ospf6 keeps a flag to remember whether the cost for an interface
was manually added via config or computed automatically, but if
the configured value matches the auto-computed one we were not
setting this flag, meaning that the config would not show up in
the config.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
When an unknown LSA is in the database and the user issues the
"show ipv6 ospf6 database" command there is a crash. The code currently
doesn't properly handle display of unknown LSAs.
Signed-off-by: Lynne Morrison <lynne@voltaio.net>
Add more details to these logs to help make it easier to determine why
ospf6 adjacency is not coming up. Also make these logs show up without
having to turn on debug logging, again making it easier to debug the
misconfiguration.
Signed-off-by: Lynne Morrison <lynne@voltaio.net>
Neither tabs nor newlines are acceptable in syslog messages. They also
break line-based parsing of file logs.
Signed-off-by: David Lamparter <equinox@diac24.net>