Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BIRD Internet Routing Daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
ec21aecf
Commit
ec21aecf
authored
May 11, 2000
by
Pavel Machek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed nasty segfault in rip.
parent
10f5c47d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
nest/route.h
nest/route.h
+1
-0
proto/rip/rip.c
proto/rip/rip.c
+10
-2
No files found.
nest/route.h
View file @
ec21aecf
...
...
@@ -155,6 +155,7 @@ typedef struct rte {
byte
metric
;
/* RIP metric */
u16
tag
;
/* External route tag */
bird_clock_t
lastmodX
;
/* Strange kind of last modification time */
struct
rip_entry
*
entry
;
}
rip
;
#endif
#ifdef CONFIG_OSPF
...
...
proto/rip/rip.c
View file @
ec21aecf
...
...
@@ -298,6 +298,7 @@ advertise_entry( struct proto *p, struct rip_block *b, ip_addr whotoldme )
n
=
net_get
(
p
->
table
,
b
->
network
,
pxlen
);
r
=
rte_get_temp
(
a
);
r
->
u
.
rip
.
metric
=
ntohl
(
b
->
metric
)
+
rif
->
metric
;
r
->
u
.
rip
.
entry
=
NULL
;
if
(
r
->
u
.
rip
.
metric
>
P_CF
->
infinity
)
r
->
u
.
rip
.
metric
=
P_CF
->
infinity
;
r
->
u
.
rip
.
tag
=
ntohl
(
b
->
tag
);
r
->
net
=
n
;
...
...
@@ -438,7 +439,7 @@ static void
rip_timer
(
timer
*
t
)
{
struct
proto
*
p
=
t
->
data
;
struct
rip_entry
*
e
,
*
et
;
struct
fib_node
*
e
,
*
et
;
CHK_MAGIC
;
DBG
(
"RIP: tick tock
\n
"
);
...
...
@@ -456,7 +457,10 @@ rip_timer(timer *t)
if
(
now
-
rte
->
u
.
rip
.
lastmodX
>
P_CF
->
timeout_time
)
{
TRACE
(
D_EVENTS
,
"RIP: entry is too old: %I"
,
rte
->
net
->
n
.
prefix
);
e
->
metric
=
P_CF
->
infinity
;
if
(
rte
->
u
.
rip
.
entry
)
{
rte
->
u
.
rip
.
entry
->
metric
=
P_CF
->
infinity
;
rte
->
u
.
rip
.
metric
=
P_CF
->
infinity
;
}
}
if
(
now
-
rte
->
u
.
rip
.
lastmodX
>
P_CF
->
garbage_time
)
{
...
...
@@ -772,6 +776,7 @@ rip_rt_notify(struct proto *p, struct network *net, struct rte *new, struct rte
e
->
nexthop
=
new
->
attrs
->
gw
;
e
->
metric
=
0
;
e
->
whotoldme
=
IPA_NONE
;
new
->
u
.
rip
.
entry
=
e
;
e
->
tag
=
ea_get_int
(
attrs
,
EA_RIP_TAG
,
0
);
e
->
metric
=
ea_get_int
(
attrs
,
EA_RIP_METRIC
,
1
);
...
...
@@ -880,6 +885,9 @@ rip_reconfigure(struct proto *p, struct proto_config *c)
struct
rip_proto_config
*
new
=
(
struct
rip_proto_config
*
)
c
;
int
generic
=
sizeof
(
struct
proto_config
)
+
sizeof
(
list
)
/* + sizeof(struct password_item *) */
;
/* FIXME: patt_same needed */
return
0
;
if
(
!
password_same
(
P_CF
->
passwords
,
new
->
passwords
))
return
0
;
...
...
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