]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Update include files and fix a couple of minor bugs
authorshemminger <shemminger>
Tue, 16 Aug 2005 21:10:51 +0000 (21:10 +0000)
committershemminger <shemminger>
Tue, 16 Aug 2005 21:10:51 +0000 (21:10 +0000)
ChangeLog
ip/ipneigh.c
ip/iprule.c

index 708d92b090404956e77cc9be8e3c5227eed9d2ff..70ad266d6114fdcc354197264b516059bf6c72b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-16  Stephen Hemminger  <shemminger@osdl.org>
+
+       * Limit ip route flush to 10 rounds.
+       * Cleanup ip rule flush error message
+       
 2005-08-08  Stephen Hemminger  <shemminger@osdl.org>
 
        * Update to 2.6.13+ kernel headers
index 5346b8bd7b6eba403a87da9ca62f887095262fb7..1ba13ac3f0ffe52aab9907c565dcdd0d43fc624e 100644 (file)
@@ -31,6 +31,7 @@
 #include "ip_common.h"
 
 #define NUD_VALID      (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY)
+#define MAX_ROUNDS     10
 
 static struct
 {
@@ -402,7 +403,7 @@ int do_show_or_flush(int argc, char **argv, int flush)
                filter.rth = &rth;
                filter.state &= ~NUD_FAILED;
 
-               for (;;) {
+               while (round < MAX_ROUNDS) {
                        if (rtnl_wilddump_request(&rth, filter.family, RTM_GETNEIGH) < 0) {
                                perror("Cannot send dump request");
                                exit(1);
@@ -428,6 +429,9 @@ int do_show_or_flush(int argc, char **argv, int flush)
                                fflush(stdout);
                        }
                }
+               printf("*** Flush not complete bailing out after %d rounds\n",
+                       MAX_ROUNDS);
+               return 1;
        }
 
        if (rtnl_wilddump_request(&rth, filter.family, RTM_GETNEIGH) < 0) {
index 0ad0d3657df936ae347062f7a7446955d0c902d7..9c43011d20ccd2605373fd04bbe7e3c161a2395f 100644 (file)
@@ -340,7 +340,7 @@ static int iprule_flush(int argc, char **argv)
                af = AF_INET;
 
        if (argc > 0) {
-               fprintf(stderr, "\"ip rule flush\" need not any arguments.\n");
+               fprintf(stderr, "\"ip rule flush\" does not allow arguments\n");
                return -1;
        }