libiproute: handle table ids larger than 255
[oweals/busybox.git] / networking / libiproute / ipneigh.c
index 151d3d109bcc83378ff128bb1a99ca3586e89a69..2a1c20e20b3c3109df4219026d5bda15191c26ec 100644 (file)
@@ -42,6 +42,7 @@ struct filter_t {
 typedef struct filter_t filter_t;
 
 #define G_filter (*(filter_t*)bb_common_bufsiz1)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
 
 static int flush_update(void)
 {
@@ -61,7 +62,7 @@ static unsigned nud_state_a2n(char *arg)
                "stale\0"     "incomplete\0"  "delay\0"  "probe\0"
                "failed\0"
                ;
-       static uint8_t nuds[] = {
+       static uint8_t nuds[] ALIGN1 = {
                NUD_PERMANENT,NUD_REACHABLE, NUD_NOARP,NUD_NONE,
                NUD_STALE,    NUD_INCOMPLETE,NUD_DELAY,NUD_PROBE,
                NUD_FAILED
@@ -339,6 +340,8 @@ int FAST_FUNC do_ipneigh(char **argv)
                /*0-1*/ "show\0"  "flush\0";
        int command_num;
 
+       INIT_G();
+
        if (!*argv)
                return ipneigh_list_or_flush(argv, 0);