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
f53f4863
Commit
f53f4863
authored
5 years ago
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify parsing of wildcard updates.
parent
b66c1733
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
message.c
message.c
+17
-12
No files found.
message.c
View file @
f53f4863
...
...
@@ -702,18 +702,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
(
message
[
3
]
&
0x40
)
?
"/id"
:
""
,
format_prefix
(
prefix
,
plen
),
format_address
(
from
),
ifp
->
name
);
if
(
message
[
2
]
==
0
)
{
rc
=
parse_other_subtlv
(
message
+
12
,
len
-
10
);
if
(
rc
<
0
)
goto
done
;
if
(
metric
<
0xFFFF
)
{
fprintf
(
stderr
,
"Received wildcard update with finite metric.
\n
"
);
goto
done
;
}
retract_neighbour_routes
(
neigh
);
goto
done
;
}
else
if
(
message
[
2
]
==
1
)
{
if
(
message
[
2
]
==
1
)
{
if
(
!
have_v4_nh
)
goto
fail
;
nh
=
v4_nh
;
...
...
@@ -729,6 +718,22 @@ parse_packet(const unsigned char *from, struct interface *ifp,
src_prefix
,
&
src_plen
);
if
(
rc
<
0
)
goto
done
;
if
(
message
[
2
]
==
0
)
{
if
(
metric
<
0xFFFF
)
{
fprintf
(
stderr
,
"Received wildcard update with finite metric.
\n
"
);
goto
done
;
}
if
(
src_plen
>
0
)
{
fprintf
(
stderr
,
"Received wildcard update with source prefix.
\n
"
);
goto
done
;
}
retract_neighbour_routes
(
neigh
);
goto
done
;
}
is_ss
=
!
is_default
(
src_prefix
,
src_plen
);
debugf
(
"Received update%s%s for dst %s%s%s from %s on %s.
\n
"
,
(
message
[
3
]
&
0x80
)
?
"/prefix"
:
""
,
...
...
This diff is collapsed.
Click to expand it.
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