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
0bffdbe3
Commit
0bffdbe3
authored
Aug 11, 2014
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format source-specific wildcard unicast requests.
parent
9ba2198b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
message.c
message.c
+33
-13
No files found.
message.c
View file @
0bffdbe3
...
@@ -1835,17 +1835,39 @@ send_unicast_request(struct neighbour *neigh,
...
@@ -1835,17 +1835,39 @@ send_unicast_request(struct neighbour *neigh,
/* make sure any buffered updates go out before this request. */
/* make sure any buffered updates go out before this request. */
flushupdates
(
neigh
->
ifp
);
flushupdates
(
neigh
->
ifp
);
if
(
!
prefix
)
if
(
prefix
&&
src_prefix
)
{
debugf
(
"sending unicast request to %s for any.
\n
"
,
format_address
(
neigh
->
address
));
else
debugf
(
"sending unicast request to %s for %s from %s.
\n
"
,
debugf
(
"sending unicast request to %s for %s from %s.
\n
"
,
format_address
(
neigh
->
address
),
format_address
(
neigh
->
address
),
format_prefix
(
prefix
,
plen
),
format_prefix
(
prefix
,
plen
),
format_prefix
(
src_prefix
,
src_plen
));
format_prefix
(
src_prefix
,
src_plen
));
}
else
if
(
prefix
)
{
debugf
(
"sending unicast request to %s for any specific.
\n
"
,
format_address
(
neigh
->
address
));
rc
=
start_unicast_message
(
neigh
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
3
);
if
(
rc
<
0
)
return
;
accumulate_unicast_byte
(
neigh
,
0
);
accumulate_unicast_byte
(
neigh
,
0
);
accumulate_unicast_byte
(
neigh
,
0
);
end_unicast_message
(
neigh
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
3
);
return
;
}
else
if
(
src_prefix
)
{
debugf
(
"sending unicast request to %s for any.
\n
"
,
format_address
(
neigh
->
address
));
rc
=
start_unicast_message
(
neigh
,
MESSAGE_REQUEST
,
2
);
if
(
rc
<
0
)
return
;
accumulate_unicast_byte
(
neigh
,
0
);
accumulate_unicast_byte
(
neigh
,
0
);
end_unicast_message
(
neigh
,
MESSAGE_REQUEST
,
2
);
return
;
}
else
{
send_unicast_request
(
neigh
,
NULL
,
0
,
zeroes
,
0
);
send_unicast_request
(
neigh
,
zeroes
,
0
,
NULL
,
0
);
return
;
}
v4
=
plen
>=
96
&&
v4mapped
(
prefix
);
v4
=
plen
>=
96
&&
v4mapped
(
prefix
);
pb
=
v4
?
((
plen
-
96
)
+
7
)
/
8
:
(
plen
+
7
)
/
8
;
pb
=
v4
?
((
plen
-
96
)
+
7
)
/
8
:
(
plen
+
7
)
/
8
;
len
=
!
prefix
?
2
:
2
+
pb
;
len
=
2
+
pb
;
if
(
src_plen
!=
0
)
{
if
(
src_plen
!=
0
)
{
spb
=
v4
?
((
src_plen
-
96
)
+
7
)
/
8
:
(
src_plen
+
7
)
/
8
;
spb
=
v4
?
((
src_plen
-
96
)
+
7
)
/
8
:
(
src_plen
+
7
)
/
8
;
...
@@ -1855,16 +1877,14 @@ send_unicast_request(struct neighbour *neigh,
...
@@ -1855,16 +1877,14 @@ send_unicast_request(struct neighbour *neigh,
rc
=
start_unicast_message
(
neigh
,
MESSAGE_REQUEST
,
len
);
rc
=
start_unicast_message
(
neigh
,
MESSAGE_REQUEST
,
len
);
}
}
if
(
rc
<
0
)
return
;
if
(
rc
<
0
)
return
;
accumulate_unicast_byte
(
neigh
,
!
prefix
?
0
:
v4
?
1
:
2
);
accumulate_unicast_byte
(
neigh
,
v4
?
1
:
2
);
accumulate_unicast_byte
(
neigh
,
!
prefix
?
0
:
v4
?
plen
-
96
:
plen
);
accumulate_unicast_byte
(
neigh
,
v4
?
plen
-
96
:
plen
);
if
(
src_plen
!=
0
)
if
(
src_plen
!=
0
)
accumulate_unicast_byte
(
neigh
,
v4
?
src_plen
-
96
:
src_plen
);
accumulate_unicast_byte
(
neigh
,
v4
?
src_plen
-
96
:
src_plen
);
if
(
prefix
)
{
if
(
v4
)
if
(
v4
)
accumulate_unicast_bytes
(
neigh
,
prefix
+
12
,
pb
);
accumulate_unicast_bytes
(
neigh
,
prefix
+
12
,
pb
);
else
else
accumulate_unicast_bytes
(
neigh
,
prefix
,
pb
);
accumulate_unicast_bytes
(
neigh
,
prefix
,
pb
);
}
if
(
src_plen
!=
0
)
{
if
(
src_plen
!=
0
)
{
if
(
v4
)
if
(
v4
)
accumulate_unicast_bytes
(
neigh
,
src_prefix
+
12
,
spb
);
accumulate_unicast_bytes
(
neigh
,
src_prefix
+
12
,
spb
);
...
...
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