From: Stephen Hemminger Date: Tue, 26 Sep 2006 00:27:37 +0000 (-0700) Subject: Fix XFRM monitor X-Git-Tag: v2.6.19-061214~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77219712bf5bbb1a65961c9b322e4a68c55276ab;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/xfrm_monitor.c b/ip/xfrm_monitor.c index 153621f74..baa461066 100644 --- a/ip/xfrm_monitor.c +++ b/ip/xfrm_monitor.c @@ -152,9 +152,10 @@ static int xfrm_accept_msg(const struct sockaddr_nl *who, return 0; } +extern struct rtnl_handle rth; + int do_xfrm_monitor(int argc, char **argv) { - struct rtnl_handle rth; char *file = NULL; unsigned groups = ~((unsigned)0); /* XXX */ int lacquire=0; @@ -162,6 +163,8 @@ int do_xfrm_monitor(int argc, char **argv) int lpolicy=0; int lsa=0; + rtnl_close(&rth); + while (argc > 0) { if (matches(*argv, "file") == 0) { NEXT_ARG();