Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
9b7de4c4
Commit
9b7de4c4
authored
Jun 04, 2004
by
Ondřej Filip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'struct proto' removed
Finally, I found the bug reported by Andreas Steinmetz. FIXED.
parent
54467ed4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
proto/ospf/lsack.c
proto/ospf/lsack.c
+2
-2
proto/ospf/lsupd.c
proto/ospf/lsupd.c
+9
-8
proto/ospf/lsupd.h
proto/ospf/lsupd.h
+1
-1
proto/ospf/packet.c
proto/ospf/packet.c
+1
-1
No files found.
proto/ospf/lsack.c
View file @
9b7de4c4
...
...
@@ -162,9 +162,9 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps,
{
ntohlsah
(
plsa
+
i
,
&
lsa
);
if
((
en
=
ospf_hash_find_header
(
n
->
lsrth
,
&
lsa
))
==
NULL
)
continue
;
continue
;
/* pg 155 */
if
(
lsa_comp
(
&
lsa
,
&
en
->
lsa
)
!=
CMP_SAME
)
if
(
lsa_comp
(
&
lsa
,
&
en
->
lsa
)
!=
CMP_SAME
)
/* pg 156 */
{
if
((
lsa
.
sn
==
LSA_MAXSEQNO
)
&&
(
lsa
.
age
==
LSA_MAXAGE
))
continue
;
...
...
proto/ospf/lsupd.c
View file @
9b7de4c4
...
...
@@ -261,22 +261,21 @@ ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l)
}
void
ospf_lsupd_r
x
(
struct
ospf_lsupd_packet
*
ps
,
struct
proto
*
p
,
ospf_lsupd_r
eceive
(
struct
ospf_lsupd_packet
*
ps
,
struct
ospf_iface
*
ifa
,
u16
size
)
{
u32
area
,
nrid
,
myrid
;
u32
area
,
nrid
;
struct
ospf_neighbor
*
n
,
*
ntmp
;
struct
ospf_lsa_header
*
lsa
;
struct
ospf_area
*
oa
;
struct
proto_ospf
*
po
=
(
struct
proto_ospf
*
)
p
;
struct
proto_ospf
*
po
=
ifa
->
proto
;
struct
proto
*
p
=
(
struct
proto
*
)
po
;
u16
length
;
u8
i
;
int
sendreq
=
1
;
nrid
=
ntohl
(
ps
->
ospf_packet
.
routerid
);
myrid
=
p
->
cf
->
global
->
router_id
;
if
((
n
=
find_neigh
(
ifa
,
nrid
))
==
NULL
)
{
OSPF_TRACE
(
D_PACKETS
,
"Received lsupd from unknown neighbor! (%I)"
,
...
...
@@ -424,6 +423,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
if
(
lsadb
&&
((
now
-
lsadb
->
inst_t
)
<=
MINLSARRIVAL
))
/* FIXME: test for flooding? */
{
DBG
(
"I got it in less that MINLSARRIVAL
\n
"
);
sendreq
=
0
;
continue
;
}
...
...
@@ -496,6 +496,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
/* pg145 (7b) */
ospf_lsack_enqueue
(
n
,
lsa
,
ACKL_DIRECT
);
}
sendreq
=
0
;
continue
;
}
...
...
@@ -520,9 +521,9 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
/* Send direct LSAs */
ospf_lsack_send
(
n
,
ACKL_DIRECT
);
if
(
n
->
state
==
NEIGHBOR_LOADING
)
if
(
sendreq
&&
(
n
->
state
==
NEIGHBOR_LOADING
)
)
{
ospf_lsreq_send
(
n
);
/*
Send me
another part of database */
ospf_lsreq_send
(
n
);
/*
Ask for
another part of
neighbor's
database */
}
}
...
...
proto/ospf/lsupd.h
View file @
9b7de4c4
...
...
@@ -11,7 +11,7 @@
#define _BIRD_OSPF_LSUPD_H_
void
ospf_lsupd_tx_list
(
struct
ospf_neighbor
*
n
,
list
*
l
);
void
ospf_lsupd_r
x
(
struct
ospf_lsupd_packet
*
ps
,
struct
proto
*
p
,
void
ospf_lsupd_r
eceive
(
struct
ospf_lsupd_packet
*
ps
,
struct
ospf_iface
*
ifa
,
u16
size
);
int
flood_lsa
(
struct
ospf_neighbor
*
n
,
struct
ospf_lsa_header
*
hn
,
struct
ospf_lsa_header
*
hh
,
struct
proto_ospf
*
po
,
struct
ospf_iface
*
iff
,
...
...
proto/ospf/packet.c
View file @
9b7de4c4
...
...
@@ -188,7 +188,7 @@ ospf_rx_hook (sock *sk, int size)
break
;
case
LSUPD_P
:
DBG
(
"%s: Link state update received.
\n
"
,
p
->
name
);
ospf_lsupd_r
x
((
struct
ospf_lsupd_packet
*
)
ps
,
p
,
ifa
,
size
);
ospf_lsupd_r
eceive
((
struct
ospf_lsupd_packet
*
)
ps
,
ifa
,
size
);
break
;
case
LSACK_P
:
DBG
(
"%s: Link state ack received.
\n
"
,
p
->
name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment