Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
fc57a9df
Commit
fc57a9df
authored
Sep 07, 2005
by
shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ip monitor since it is special and can't reuse
rtnl_open handle.
parent
ce715cd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
ip/ip.c
ip/ip.c
+6
-0
ip/ipmonitor.c
ip/ipmonitor.c
+5
-2
No files found.
ip/ip.c
View file @
fc57a9df
...
...
@@ -53,6 +53,11 @@ static void usage(void)
exit
(
-
1
);
}
static
int
do_help
(
int
argc
,
char
**
argv
)
{
usage
();
}
static
const
struct
cmd
{
const
char
*
cmd
;
int
(
*
func
)(
int
argc
,
char
**
argv
);
...
...
@@ -66,6 +71,7 @@ static const struct cmd {
{
"tunnel"
,
do_iptunnel
},
{
"monitor"
,
do_ipmonitor
},
{
"xfrm"
,
do_xfrm
},
{
"help"
,
do_help
},
{
0
}
};
...
...
ip/ipmonitor.c
View file @
fc57a9df
...
...
@@ -95,6 +95,7 @@ int do_ipmonitor(int argc, char **argv)
int
lroute
=
0
;
int
lprefix
=
0
;
rtnl_close
(
&
rth
);
ipaddr_reset_filter
(
1
);
iproute_reset_filter
();
ipneigh_reset_filter
();
...
...
@@ -152,12 +153,14 @@ int do_ipmonitor(int argc, char **argv)
perror
(
"Cannot fopen"
);
exit
(
-
1
);
}
return
rtnl_from_file
(
fp
,
accept_msg
,
(
void
*
)
stdout
);
return
rtnl_from_file
(
fp
,
accept_msg
,
stdout
);
}
if
(
rtnl_open
(
&
rth
,
groups
)
<
0
)
exit
(
1
);
ll_init_map
(
&
rth
);
if
(
rtnl_listen
(
&
rth
,
accept_msg
,
(
void
*
)
stdout
)
<
0
)
if
(
rtnl_listen
(
&
rth
,
accept_msg
,
stdout
)
<
0
)
exit
(
2
);
return
0
;
...
...
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