]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/ipmonitor.c
Update header files to 2.6.14
[mirror_iproute2.git] / ip / ipmonitor.c
index 819f9f6a7b95204030a2112f5c8750972cc76857..9f7256370a3c0d7561e46bb37d4bd29f7a0a59dc 100644 (file)
@@ -88,7 +88,6 @@ int accept_msg(const struct sockaddr_nl *who,
 
 int do_ipmonitor(int argc, char **argv)
 {
-       struct rtnl_handle rth;
        char *file = NULL;
        unsigned groups = ~RTMGRP_TC;
        int llink=0;
@@ -156,13 +155,10 @@ int do_ipmonitor(int argc, char **argv)
                return rtnl_from_file(fp, accept_msg, (void*)stdout);
        }
 
-       if (rtnl_open(&rth, groups) < 0)
-               exit(1);
-
        ll_init_map(&rth);
 
        if (rtnl_listen(&rth, accept_msg, (void*)stdout) < 0)
                exit(2);
 
-       exit(0);
+       return 0;
 }