Fix XFRM monitor

The change to hold open the netlink socket (for ip batch mode),
broke XFRM monitoring.

Bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383133

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
This commit is contained in:
Stephen Hemminger 2006-09-25 17:27:37 -07:00
parent 302d3fb720
commit 77219712bf

View File

@ -152,9 +152,10 @@ static int xfrm_accept_msg(const struct sockaddr_nl *who,
return 0; return 0;
} }
extern struct rtnl_handle rth;
int do_xfrm_monitor(int argc, char **argv) int do_xfrm_monitor(int argc, char **argv)
{ {
struct rtnl_handle rth;
char *file = NULL; char *file = NULL;
unsigned groups = ~((unsigned)0); /* XXX */ unsigned groups = ~((unsigned)0); /* XXX */
int lacquire=0; int lacquire=0;
@ -162,6 +163,8 @@ int do_xfrm_monitor(int argc, char **argv)
int lpolicy=0; int lpolicy=0;
int lsa=0; int lsa=0;
rtnl_close(&rth);
while (argc > 0) { while (argc > 0) {
if (matches(*argv, "file") == 0) { if (matches(*argv, "file") == 0) {
NEXT_ARG(); NEXT_ARG();