]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Fix XFRM monitor
authorStephen Hemminger <shemminger@osdl.org>
Tue, 26 Sep 2006 00:27:37 +0000 (17:27 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Tue, 26 Sep 2006 00:27:37 +0000 (17:27 -0700)
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>
ip/xfrm_monitor.c

index 153621f741593a02437e942c45ffa9285436ac2f..baa461066ca7f3223b99fe4dd66376ae92e943f6 100644 (file)
@@ -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();