Re: [nftables kernel PATCH v2] netfilter: nf_tables: fix nft_meta_target module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arturo,

   * @NFTA_META_DREG: destination register (NLA_U32)
+ * @NFTA_META_VALUE: source data to load (NLA_U32)
   * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys)
   */
  enum nft_meta_attributes {
  	NFTA_META_UNSPEC,
  	NFTA_META_DREG,
+	NFTA_META_VALUE,
  	NFTA_META_KEY,

You have to move NFTA_META_VALUE after NFTA_META_KEY, or then it will break with 3.13 kernel API version.
(your patch is going to be part of 3.14 I guess)

  	__NFTA_META_MAX
  };
(...)
+
  static const struct nla_policy nft_meta_policy[NFTA_META_MAX + 1] = {
  	[NFTA_META_DREG]	= { .type = NLA_U32 },
+	[NFTA_META_VALUE]	= { .type = NLA_U32 },
  	[NFTA_META_KEY]		= { .type = NLA_U32 },

So switch these 2 last lines accordingly.


Besides that the _match/_target naming looks still awkward to me.
But _get/_set would be more "semantically relevant" imho.

Of course it's purely subjective, as usual with naming ;)


Tomasz
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux