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
ffc0bfcf
Commit
ffc0bfcf
authored
Feb 12, 2016
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better error feedback for flush interface.
parent
d093352f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
configuration.c
configuration.c
+14
-1
No files found.
configuration.c
View file @
ffc0bfcf
...
...
@@ -897,6 +897,8 @@ parse_config_line(int c, gnc_t gnc, void *closure,
if
(
c
<
-
1
||
!
action_return
)
goto
fail
;
*
action_return
=
CONFIG_ACTION_NO
;
if
(
message_return
)
*
message_return
=
"Permission denied"
;
}
else
if
(
strcmp
(
token
,
"in"
)
==
0
)
{
struct
filter
*
filter
;
c
=
parse_filter
(
c
,
gnc
,
closure
,
&
filter
);
...
...
@@ -946,13 +948,24 @@ parse_config_line(int c, gnc_t gnc, void *closure,
goto
fail
;
if
(
strcmp
(
token2
,
"interface"
)
==
0
)
{
char
*
ifname
;
int
rc
;
c
=
getword
(
c
,
&
ifname
,
gnc
,
closure
);
c
=
skip_eol
(
c
,
gnc
,
closure
);
if
(
c
<
-
1
)
{
free
(
token2
);
goto
fail
;
}
flush_interface
(
ifname
);
rc
=
flush_interface
(
ifname
);
if
(
rc
<=
0
)
{
if
(
action_return
)
*
action_return
=
CONFIG_ACTION_NO
;
if
(
message_return
)
{
if
(
rc
<
0
)
*
message_return
=
"Couldn't flush interface"
;
else
*
message_return
=
"No such interface"
;
}
}
free
(
token2
);
free
(
ifname
);
}
else
{
...
...
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