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
22be80a1
Commit
22be80a1
authored
Jan 07, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore networks that are not up.
parent
bf0887fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
6 deletions
+40
-6
babel.c
babel.c
+20
-1
message.c
message.c
+20
-5
No files found.
babel.c
View file @
22be80a1
...
...
@@ -386,6 +386,8 @@ main(int argc, char **argv)
/* Make some noise so that others notice us */
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
gettimeofday
(
&
now
,
NULL
);
send_hello
(
&
nets
[
i
]);
send_request
(
&
nets
[
i
],
NULL
,
0
,
0
,
0
,
0
);
...
...
@@ -394,6 +396,8 @@ main(int argc, char **argv)
}
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
gettimeofday
(
&
now
,
NULL
);
send_hello
(
&
nets
[
i
]);
send_self_update
(
&
nets
[
i
],
0
);
...
...
@@ -415,6 +419,8 @@ main(int argc, char **argv)
if
(
request_resend_time
)
timeval_min_sec
(
&
tv
,
request_resend_time
);
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
timeval_min
(
&
tv
,
&
nets
[
i
].
flush_time
);
timeval_min_sec
(
&
tv
,
nets
[
i
].
hello_time
+
nets
[
i
].
hello_interval
);
...
...
@@ -464,6 +470,8 @@ main(int argc, char **argv)
}
}
else
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
if
(
nets
[
i
].
ifindex
==
sin6
.
sin6_scope_id
)
{
parse_packet
((
unsigned
char
*
)
&
sin6
.
sin6_addr
,
&
nets
[
i
],
buf
,
rc
);
...
...
@@ -502,6 +510,8 @@ main(int argc, char **argv)
}
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
if
(
now
.
tv_sec
>=
nets
[
i
].
hello_time
+
nets
[
i
].
hello_interval
)
send_hello
(
&
nets
[
i
]);
if
(
now
.
tv_sec
>=
nets
[
i
].
ihu_time
+
nets
[
i
].
ihu_interval
)
...
...
@@ -525,6 +535,8 @@ main(int argc, char **argv)
}
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
if
(
nets
[
i
].
flush_time
.
tv_sec
!=
0
)
{
if
(
timeval_compare
(
&
now
,
&
nets
[
i
].
flush_time
)
>=
0
)
flushbuf
(
&
nets
[
i
]);
...
...
@@ -546,6 +558,8 @@ main(int argc, char **argv)
}
}
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
/* Retract exported routes. */
send_self_retract
(
&
nets
[
i
]);
/* Make sure that we expire quickly from our neighbours'
...
...
@@ -556,6 +570,8 @@ main(int argc, char **argv)
usleep
(
50000
+
random
()
%
100000
);
}
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
/* Make sure they got it. */
send_self_retract
(
&
nets
[
i
]);
send_hello_noupdate
(
&
nets
[
i
],
1
);
...
...
@@ -605,8 +621,11 @@ main(int argc, char **argv)
exit
(
1
);
fail:
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
kernel_setup_interface
(
0
,
nets
[
i
].
ifname
,
nets
[
i
].
ifindex
);
}
kernel_setup_socket
(
0
);
kernel_setup
(
0
,
do_ipv4
);
exit
(
1
);
...
...
message.c
View file @
22be80a1
...
...
@@ -465,8 +465,11 @@ send_request(struct network *net,
int
i
;
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
send_request
(
&
nets
[
i
],
prefix
,
plen
,
hop_count
,
seqno
,
router_hash
);
}
return
;
}
...
...
@@ -697,8 +700,11 @@ send_update(struct network *net, int urgent,
}
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
send_update
(
&
nets
[
i
],
urgent
,
prefix
,
plen
);
if
(
!
nets
[
i
].
up
)
continue
;
}
return
;
}
...
...
@@ -753,8 +759,11 @@ send_self_update(struct network *net, int force_seqno)
update_myseqno
(
force_seqno
);
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
send_self_update
(
&
nets
[
i
],
0
);
}
return
;
}
...
...
@@ -774,8 +783,11 @@ send_self_retract(struct network *net)
int
i
;
if
(
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
send_self_retract
(
&
nets
[
i
]);
}
return
;
}
...
...
@@ -811,8 +823,11 @@ send_ihu(struct neighbour *neigh, struct network *net)
unsigned
short
interval
;
if
(
neigh
==
NULL
&&
net
==
NULL
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
!
nets
[
i
].
up
)
continue
;
send_ihu
(
NULL
,
&
nets
[
i
]);
}
return
;
}
...
...
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