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
e23f9a4b
Commit
e23f9a4b
authored
Aug 16, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fixed mask_prefix.
parent
3bd27449
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
message.c
message.c
+8
-5
No files found.
message.c
View file @
e23f9a4b
...
@@ -172,10 +172,13 @@ parse_packet(const unsigned char *from, struct network *net,
...
@@ -172,10 +172,13 @@ parse_packet(const unsigned char *from, struct network *net,
have_current_source
=
1
;
have_current_source
=
1
;
if
(
memcmp
(
address
,
myid
,
16
)
==
0
)
if
(
memcmp
(
address
,
myid
,
16
)
==
0
)
continue
;
continue
;
if
(
plen
<=
128
)
if
(
plen
<=
128
)
{
update_route
(
address
,
mask_prefix
(
address
,
plen
),
plen
,
unsigned
char
prefix
[
16
];
seqno
,
metric
,
neigh
);
mask_prefix
(
prefix
,
address
,
plen
);
update_route
(
address
,
prefix
,
plen
,
seqno
,
metric
,
neigh
);
}
}
else
if
(
type
==
4
)
{
}
else
if
(
type
==
4
)
{
unsigned
char
prefix
[
16
];
debugf
(
"Received prefix %s on %s from %s (%s).
\n
"
,
debugf
(
"Received prefix %s on %s from %s (%s).
\n
"
,
format_prefix
(
address
,
plen
),
format_prefix
(
address
,
plen
),
net
->
ifname
,
net
->
ifname
,
...
@@ -191,8 +194,8 @@ parse_packet(const unsigned char *from, struct network *net,
...
@@ -191,8 +194,8 @@ parse_packet(const unsigned char *from, struct network *net,
}
}
if
(
memcmp
(
current_source
,
myid
,
16
)
==
0
)
if
(
memcmp
(
current_source
,
myid
,
16
)
==
0
)
continue
;
continue
;
update_route
(
current_source
,
mask_prefix
(
address
,
plen
),
plen
,
mask_prefix
(
prefix
,
address
,
plen
);
seqno
,
metric
,
neigh
);
update_route
(
current_source
,
prefix
,
plen
,
seqno
,
metric
,
neigh
);
}
else
{
}
else
{
debugf
(
"Received unknown packet type %d from %s (%s).
\n
"
,
debugf
(
"Received unknown packet type %d from %s (%s).
\n
"
,
type
,
format_address
(
neigh
->
id
),
format_address
(
from
));
type
,
format_address
(
neigh
->
id
),
format_address
(
from
));
...
...
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