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
052068bb
Commit
052068bb
authored
Jun 12, 2013
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't discard first character after first token of config line.
parent
47ef5722
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
configuration.c
configuration.c
+6
-16
No files found.
configuration.c
View file @
052068bb
...
...
@@ -273,9 +273,8 @@ getnet(int c, unsigned char **p_r, unsigned char *plen_r, int *af_r,
}
static
struct
filter
*
parse_filter
(
gnc_t
gnc
,
void
*
closure
)
parse_filter
(
int
c
,
gnc_t
gnc
,
void
*
closure
)
{
int
c
;
char
*
token
;
struct
filter
*
filter
;
...
...
@@ -284,10 +283,6 @@ parse_filter(gnc_t gnc, void *closure)
goto
error
;
filter
->
plen_le
=
128
;
c
=
gnc
(
closure
);
if
(
c
<
-
1
)
goto
error
;
while
(
c
>=
0
&&
c
!=
'\n'
)
{
c
=
skip_whitespace
(
c
,
gnc
,
closure
);
if
(
c
==
'\n'
||
c
==
'#'
)
{
...
...
@@ -380,9 +375,8 @@ parse_filter(gnc_t gnc, void *closure)
}
static
struct
interface_conf
*
parse_ifconf
(
gnc_t
gnc
,
void
*
closure
)
parse_ifconf
(
int
c
,
gnc_t
gnc
,
void
*
closure
)
{
int
c
;
char
*
token
;
struct
interface_conf
*
if_conf
;
...
...
@@ -390,10 +384,6 @@ parse_ifconf(gnc_t gnc, void *closure)
if
(
if_conf
==
NULL
)
goto
error
;
c
=
gnc
(
closure
);
if
(
c
<
-
1
)
goto
error
;
c
=
skip_whitespace
(
c
,
gnc
,
closure
);
if
(
c
<
-
1
||
c
==
'\n'
||
c
==
'#'
)
goto
error
;
...
...
@@ -574,25 +564,25 @@ parse_config(gnc_t gnc, void *closure)
if
(
strcmp
(
token
,
"in"
)
==
0
)
{
struct
filter
*
filter
;
filter
=
parse_filter
(
gnc
,
closure
);
filter
=
parse_filter
(
c
,
gnc
,
closure
);
if
(
filter
==
NULL
)
return
-
1
;
add_filter
(
filter
,
&
input_filters
);
}
else
if
(
strcmp
(
token
,
"out"
)
==
0
)
{
struct
filter
*
filter
;
filter
=
parse_filter
(
gnc
,
closure
);
filter
=
parse_filter
(
c
,
gnc
,
closure
);
if
(
filter
==
NULL
)
return
-
1
;
add_filter
(
filter
,
&
output_filters
);
}
else
if
(
strcmp
(
token
,
"redistribute"
)
==
0
)
{
struct
filter
*
filter
;
filter
=
parse_filter
(
gnc
,
closure
);
filter
=
parse_filter
(
c
,
gnc
,
closure
);
if
(
filter
==
NULL
)
return
-
1
;
add_filter
(
filter
,
&
redistribute_filters
);
}
else
if
(
strcmp
(
token
,
"interface"
)
==
0
)
{
struct
interface_conf
*
if_conf
;
if_conf
=
parse_ifconf
(
gnc
,
closure
);
if_conf
=
parse_ifconf
(
c
,
gnc
,
closure
);
if
(
if_conf
==
NULL
)
return
-
1
;
add_ifconf
(
if_conf
,
&
interface_confs
);
...
...
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