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
a2a1dfe0
Commit
a2a1dfe0
authored
Oct 22, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parsing of IPv4 requests.
parent
a8d30880
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
message.c
message.c
+10
-10
No files found.
message.c
View file @
a2a1dfe0
...
...
@@ -371,15 +371,15 @@ parse_packet(const unsigned char *from, struct network *net,
update_route
(
router_id
,
prefix
,
plen
,
seqno
,
metric
,
interval
,
neigh
,
nh
);
}
else
if
(
type
==
MESSAGE_REQUEST
)
{
unsigned
char
prefix
[
16
];
unsigned
char
prefix
[
16
]
,
plen
;
int
rc
;
if
(
len
<
2
)
goto
fail
;
if
(
len
<
2
)
goto
fail
;
rc
=
network_prefix
(
message
[
2
],
message
[
3
],
0
,
message
+
4
,
NULL
,
len
-
2
,
prefix
);
if
(
rc
<
0
)
goto
fail
;
plen
=
message
[
3
]
+
(
message
[
2
]
==
1
?
96
:
0
);
debugf
(
"Received request for %s from %s on %s.
\n
"
,
message
[
2
]
==
0
?
"any"
:
format_prefix
(
prefix
,
message
[
3
]
),
message
[
2
]
==
0
?
"any"
:
format_prefix
(
prefix
,
plen
),
format_address
(
from
),
net
->
ifname
);
if
(
message
[
2
]
==
0
)
{
/* If a neighbour is requesting a full route dump from us,
...
...
@@ -387,24 +387,24 @@ parse_packet(const unsigned char *from, struct network *net,
send_ihu
(
neigh
,
NULL
);
send_update
(
neigh
->
network
,
0
,
NULL
,
0
);
}
else
{
send_update
(
neigh
->
network
,
0
,
prefix
,
message
[
3
]
);
send_update
(
neigh
->
network
,
0
,
prefix
,
plen
);
}
}
else
if
(
type
==
MESSAGE_MH_REQUEST
)
{
unsigned
char
prefix
[
16
];
unsigned
char
prefix
[
16
]
,
plen
;
unsigned
short
seqno
;
int
rc
;
if
(
len
<
14
)
goto
fail
;
if
(
len
<
14
)
goto
fail
;
DO_NTOHS
(
seqno
,
message
+
4
);
rc
=
network_prefix
(
message
[
2
],
message
[
3
],
0
,
message
+
16
,
NULL
,
len
-
14
,
prefix
);
if
(
rc
<
0
)
goto
fail
;
plen
=
message
[
3
]
+
(
message
[
2
]
==
1
?
96
:
0
);
debugf
(
"Received request (%d) for %s from %s on %s (%s, %d).
\n
"
,
message
[
6
],
format_prefix
(
prefix
,
message
[
3
]
),
format_prefix
(
prefix
,
plen
),
format_address
(
from
),
net
->
ifname
,
format_eui64
(
message
+
8
),
seqno
);
handle_request
(
neigh
,
prefix
,
message
[
3
]
,
message
[
6
],
handle_request
(
neigh
,
prefix
,
plen
,
message
[
6
],
seqno
,
message
+
8
);
}
else
{
debugf
(
"Received unknown packet type %d from %s on %s.
\n
"
,
...
...
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