Fixes wrong LSA collision detection and add birdvty group

PR:		232231
Submitted by:	Julien Charbon <jcharbon@verisign.com>
Submitted by:	Asbjorn Mikkelsen <amikkelsen@verisign.com>
Sponsored by:	Verisign
This commit is contained in:
Olivier Cochard 2018-11-10 23:02:44 +00:00
parent a2465c456e
commit 1895053da9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=484648
6 changed files with 49 additions and 3 deletions

2
GIDs
View File

@ -442,7 +442,7 @@ alertmanager:*:479:
# free: 499
# free: 500
# free: 501
# free: 502
birdvty:*:502:
# free: 503
# free: 504
_bbstored:*:505:

View File

@ -3,6 +3,7 @@
PORTNAME= bird
PORTVERSION= 1.6.4
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://bird.network.cz/pub/bird/

View File

@ -28,7 +28,8 @@ extra_commands="reload"
: ${bird_enable="NO"}
: ${bird_config="%%PREFIX%%/etc/bird.conf"}
: ${bird_group="birdvty"}
command_args="-P /var/run/${name}.pid -c $bird_config"
command_args="-P /var/run/${name}.pid -c $bird_config -g $bird_group"
run_rc_command "$1"

View File

@ -28,7 +28,8 @@ extra_commands="reload"
: ${bird6_enable="NO"}
: ${bird6_config="%%PREFIX%%/etc/bird6.conf"}
: ${bird6_group="birdvty"}
command_args="-P /var/run/${name}.pid -c $bird6_config"
command_args="-P /var/run/${name}.pid -c $bird6_config -g $bird6_group"
run_rc_command "$1"

View File

@ -0,0 +1,11 @@
--- proto/ospf/lsupd.c 2015-04-22 14:41:44.000000000 +0000
+++ proto/ospf/lsupd.c 2016-03-22 13:09:59.000000000 +0000
@@ -593,7 +593,7 @@
if ((lsa.rt == p->router_id) ||
(ospf_is_v2(p) && (lsa_type == LSA_T_NET) && ospf_addr_is_local(p, ifa->oa, ipa_from_u32(lsa.id))))
{
- OSPF_TRACE(D_EVENTS, "Received unexpected self-originated LSA");
+ log(L_INFO "Received unexpected self-originated LSA");
ospf_advance_lsa(p, en, &lsa, lsa_type, lsa_domain, body);
continue;
}

View File

@ -0,0 +1,32 @@
--- proto/ospf/topology.c 2015-04-22 14:41:44.000000000 +0000
+++ proto/ospf/topology.c 2016-03-24 13:36:04.000000000 +0000
@@ -79,8 +79,12 @@
* then we have en->mode from the postponed LSA origination.
*/
- OSPF_TRACE(D_EVENTS, "Installing LSA: Type: %04x, Id: %R, Rt: %R, Seq: %08x, Age: %u",
- en->lsa_type, en->lsa.id, en->lsa.rt, en->lsa.sn, en->lsa.age);
+ if (en->lsa.rt == p->router_id || (p->p.debug & D_EVENTS) ||
+ OSPF_FORCE_DEBUG)
+ {
+ log(L_INFO "Installing LSA: Type: %04x, Id: %R, Rt: %R, Seq: %08x, Age: %u",
+ en->lsa_type, en->lsa.id, en->lsa.rt, en->lsa.sn, en->lsa.age);
+ }
if (change)
ospf_schedule_rtcalc(p);
@@ -281,6 +285,14 @@
if (!en->nf || !en->lsa_body)
en->nf = lsa->nf;
+ if (en->lsa_body && (en->lsa.age == LSA_MAXAGE))
+ {
+ /* en could be an unexpected self-originated lsa in which case nf is NULL */
+ log(L_INFO "%s: Found flushing LSA while originating %I/%d with fib: %p",
+ p->p.name, lsa->nf->fn.prefix, lsa->nf->fn.pxlen, en->nf);
+ en->nf = lsa->nf;
+ }
+
if (en->nf != lsa->nf)
{
log(L_ERR "%s: LSA ID collision for %I/%d",