datapath: Drop flow information from odp_stats.
[openvswitch] / datapath / brcompat.c
index f23db93cefd417529a2cb73804ad2ed24b6c0678..43cbfb0d9eebacd539fd4fee0efa4a9659016d0c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2011 Nicira Networks.
  * Distributed under the terms of the GNU GPL version 2.
  *
  * Significant portions of this file may be copied from parts of the Linux
@@ -17,7 +17,6 @@
 #include <linux/rtnetlink.h>
 #include <net/genetlink.h>
 
-#include "compat.h"
 #include "openvswitch/brcompat-netlink.h"
 #include "brc_procfs.h"
 #include "datapath.h"
@@ -409,9 +408,13 @@ static struct genl_ops brc_genl_ops_query_dp = {
 static struct nla_policy brc_genl_policy[BRC_GENL_A_MAX + 1] = {
        [BRC_GENL_A_ERR_CODE] = { .type = NLA_U32 },
 
-       [BRC_GENL_A_PROC_DIR] = { .type = NLA_NUL_STRING },
-       [BRC_GENL_A_PROC_NAME] = { .type = NLA_NUL_STRING },
+#ifdef HAVE_NLA_NUL_STRING
+       [BRC_GENL_A_PROC_DIR] = { .type = NLA_NUL_STRING,
+                                 .len = BRC_NAME_LEN_MAX },
+       [BRC_GENL_A_PROC_NAME] = { .type = NLA_NUL_STRING,
+                                 .len = BRC_NAME_LEN_MAX },
        [BRC_GENL_A_PROC_DATA] = { .type = NLA_NUL_STRING },
+#endif
 
        [BRC_GENL_A_FDB_DATA] = { .type = NLA_UNSPEC },
 };