Adding InfTransDelay for outgoing lsa.
This commit is contained in:
parent
c45f48fba5
commit
249fdef7a1
3 changed files with 13 additions and 6 deletions
|
@ -282,7 +282,7 @@ ospf_iface_default(struct ospf_iface *ifa)
|
||||||
ifa->an=0; /* FIXME This should respect config */
|
ifa->an=0; /* FIXME This should respect config */
|
||||||
ifa->cost=COST_D;
|
ifa->cost=COST_D;
|
||||||
ifa->rxmtint=RXMTINT_D;
|
ifa->rxmtint=RXMTINT_D;
|
||||||
ifa->iftransdelay=IFTRANSDELAY_D;
|
ifa->inftransdelay=INFTRANSDELAY_D;
|
||||||
ifa->priority=PRIORITY_D;
|
ifa->priority=PRIORITY_D;
|
||||||
ifa->helloint=HELLOINT_D;
|
ifa->helloint=HELLOINT_D;
|
||||||
ifa->deadc=DEADC_D;
|
ifa->deadc=DEADC_D;
|
||||||
|
|
|
@ -105,9 +105,16 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
|
||||||
{
|
{
|
||||||
u8 *help;
|
u8 *help;
|
||||||
struct top_hash_entry *en;
|
struct top_hash_entry *en;
|
||||||
htonlsah(hh,(struct ospf_lsa_header *)(pk+1));
|
struct ospf_lsa_header *lh;
|
||||||
help=(u8 *)(pk+1);
|
u16 age;
|
||||||
help+=sizeof(struct ospf_lsa_header);
|
|
||||||
|
lh=(struct ospf_lsa_header *)(pk+1);
|
||||||
|
htonlsah(hh,lh);
|
||||||
|
age=hh->age;
|
||||||
|
age+=ifa->inftransdelay;
|
||||||
|
if(age>LSA_MAXAGE) age=LSA_MAXAGE;
|
||||||
|
lh->age=htons(age);
|
||||||
|
help=(u8 *)(lh+1);
|
||||||
en=ospf_hash_find_header(oa->gr,hh);
|
en=ospf_hash_find_header(oa->gr,hh);
|
||||||
htonlsab(en->lsa_body,help,hh->type,hh->length);
|
htonlsab(en->lsa_body,help,hh->type,hh->length);
|
||||||
len=hh->length;
|
len=hh->length;
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct ospf_iface {
|
||||||
list neigh_list; /* List of neigbours */
|
list neigh_list; /* List of neigbours */
|
||||||
u16 cost; /* Cost of iface */
|
u16 cost; /* Cost of iface */
|
||||||
u16 rxmtint; /* number of seconds between LSA retransmissions */
|
u16 rxmtint; /* number of seconds between LSA retransmissions */
|
||||||
u16 iftransdelay; /* The estimated number of seconds it takes to
|
u16 inftransdelay; /* The estimated number of seconds it takes to
|
||||||
transmit a Link State Update Packet over this
|
transmit a Link State Update Packet over this
|
||||||
interface. LSAs contained in the update */
|
interface. LSAs contained in the update */
|
||||||
u8 priority; /* A router priority for DR election */
|
u8 priority; /* A router priority for DR election */
|
||||||
|
@ -95,7 +95,7 @@ struct ospf_iface {
|
||||||
/* Default values for interface parameters */
|
/* Default values for interface parameters */
|
||||||
#define COST_D 10
|
#define COST_D 10
|
||||||
#define RXMTINT_D 5
|
#define RXMTINT_D 5
|
||||||
#define IFTRANSDELAY_D 1
|
#define INFTRANSDELAY_D 1
|
||||||
#define PRIORITY_D 1
|
#define PRIORITY_D 1
|
||||||
#define HELLOINT_D 10
|
#define HELLOINT_D 10
|
||||||
#define DEADC_D 4
|
#define DEADC_D 4
|
||||||
|
|
Loading…
Reference in a new issue