Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
3118ef51
Commit
3118ef51
authored
Jan 03, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove broadcast_ihu.
This also fixes a bug in sending ihu intervals.
parent
5785b018
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
babel.c
babel.c
+0
-2
message.c
message.c
+11
-18
No files found.
babel.c
View file @
3118ef51
...
...
@@ -184,8 +184,6 @@ main(int argc, char **argv)
goto
syntax
;
}
else
if
(
strcmp
(
*
arg
,
"-s"
)
==
0
)
{
split_horizon
=
0
;
}
else
if
(
strcmp
(
*
arg
,
"-b"
)
==
0
)
{
broadcast_ihu
=
1
;
}
else
if
(
strcmp
(
*
arg
,
"-S"
)
==
0
)
{
SHIFTE
();
state_file
=
*
arg
;
...
...
message.c
View file @
3118ef51
...
...
@@ -45,7 +45,6 @@ const unsigned char packet_header[8] = {42, 1};
int
add_cost
=
0
;
int
parasitic
=
0
;
int
silent_time
=
30
;
int
broadcast_ihu
=
0
;
int
split_horizon
=
1
;
unsigned
short
myseqno
=
0
;
...
...
@@ -143,11 +142,11 @@ parse_packet(const unsigned char *from, struct network *net,
continue
;
net
->
activity_time
=
now
.
tv_sec
;
if
(
type
==
1
)
{
debugf
(
"Received ihu %d for %s from %s (%s).
\n
"
,
debugf
(
"Received ihu %d for %s from %s (%s)
%d
.
\n
"
,
metric
,
format_address
(
address
),
format_address
(
neigh
->
id
),
format_address
(
from
));
format_address
(
from
)
,
seqno
);
if
(
plen
==
0xFF
||
memcmp
(
myid
,
address
,
16
)
==
0
)
{
neigh
->
txcost
=
metric
;
neigh
->
ihu_time
=
now
;
...
...
@@ -816,22 +815,11 @@ send_ihu(struct neighbour *neigh, struct network *net)
return
;
}
if
(
net
&&
net
->
ihu_interval
*
100
<=
0xFFFF
)
interval
=
net
->
ihu_interval
*
100
;
else
interval
=
0
;
if
(
neigh
==
NULL
)
{
if
(
broadcast_ihu
&&
net
->
wired
)
{
debugf
(
"Sending broadcast ihu %d to %s.
\n
"
,
net
->
cost
,
net
->
ifname
);
send_message
(
net
,
1
,
0xFF
,
0
,
interval
,
net
->
cost
,
ones
);
}
else
{
for
(
i
=
0
;
i
<
numneighs
;
i
++
)
{
if
(
neighs
[
i
].
id
[
0
]
!=
0xFF
)
{
if
(
neighs
[
i
].
network
==
net
)
send_ihu
(
&
neighs
[
i
],
net
);
}
for
(
i
=
0
;
i
<
numneighs
;
i
++
)
{
if
(
neighs
[
i
].
id
[
0
]
!=
0xFF
)
{
if
(
neighs
[
i
].
network
==
net
)
send_ihu
(
&
neighs
[
i
],
net
);
}
}
net
->
ihu_time
=
now
.
tv_sec
;
...
...
@@ -845,6 +833,11 @@ send_ihu(struct neighbour *neigh, struct network *net)
rxcost
=
neighbour_rxcost
(
neigh
);
if
(
net
->
ihu_interval
*
100
<=
0xFFFF
)
interval
=
net
->
ihu_interval
*
100
;
else
interval
=
0
;
debugf
(
"Sending ihu %d on %s to %s (%s).
\n
"
,
rxcost
,
neigh
->
network
->
ifname
,
...
...
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