diff options
Diffstat (limited to 'networking/libiproute/ipneigh.c')
-rw-r--r-- | networking/libiproute/ipneigh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/networking/libiproute/ipneigh.c b/networking/libiproute/ipneigh.c index f572414e9..984dd4bdd 100644 --- a/networking/libiproute/ipneigh.c +++ b/networking/libiproute/ipneigh.c | |||
@@ -32,7 +32,10 @@ struct filter_t { | |||
32 | int state; | 32 | int state; |
33 | int unused_only; | 33 | int unused_only; |
34 | inet_prefix pfx; | 34 | inet_prefix pfx; |
35 | /* Misnomer. Does not mean "flushed N something" */ | ||
36 | /* More like "no_of_flush_commands_constructed_by_print_neigh()" */ | ||
35 | int flushed; | 37 | int flushed; |
38 | /* Flush cmd buf. If !NULL, print_neigh() constructs flush commands in it */ | ||
36 | char *flushb; | 39 | char *flushb; |
37 | int flushp; | 40 | int flushp; |
38 | int flushe; | 41 | int flushe; |
@@ -45,7 +48,7 @@ typedef struct filter_t filter_t; | |||
45 | 48 | ||
46 | static int flush_update(void) | 49 | static int flush_update(void) |
47 | { | 50 | { |
48 | if (rtnl_send(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) { | 51 | if (rtnl_send_check(G_filter.rth, G_filter.flushb, G_filter.flushp) < 0) { |
49 | bb_perror_msg("can't send flush request"); | 52 | bb_perror_msg("can't send flush request"); |
50 | return -1; | 53 | return -1; |
51 | } | 54 | } |
@@ -299,9 +302,7 @@ static int FAST_FUNC ipneigh_list_or_flush(char **argv, int flush) | |||
299 | G_filter.rth = &rth; | 302 | G_filter.rth = &rth; |
300 | 303 | ||
301 | while (round < MAX_ROUNDS) { | 304 | while (round < MAX_ROUNDS) { |
302 | if (xrtnl_wilddump_request(&rth, G_filter.family, RTM_GETNEIGH) < 0) { | 305 | xrtnl_wilddump_request(&rth, G_filter.family, RTM_GETNEIGH); |
303 | bb_perror_msg_and_die("can't send dump request"); | ||
304 | } | ||
305 | G_filter.flushed = 0; | 306 | G_filter.flushed = 0; |
306 | if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) { | 307 | if (xrtnl_dump_filter(&rth, print_neigh, NULL) < 0) { |
307 | bb_perror_msg_and_die("flush terminated"); | 308 | bb_perror_msg_and_die("flush terminated"); |