netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ander Juaristi <a@juaristi.eus>
To: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3] netfilter: nft_meta: support for time matching
Date: Fri, 2 Aug 2019 09:36:19 +0200	[thread overview]
Message-ID: <55c6fec8-6c1d-174e-942e-b3f3d6f53542@juaristi.eus> (raw)
In-Reply-To: <20190802071233.5580-1-a@juaristi.eus>



On 2/8/19 9:12, Ander Juaristi wrote:
> diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
> index 82abaa183fc3..6d9dd120b466 100644
> --- a/include/uapi/linux/netfilter/nf_tables.h
> +++ b/include/uapi/linux/netfilter/nf_tables.h
> @@ -799,6 +799,9 @@ enum nft_exthdr_attributes {
>    * @NFT_META_OIFKIND: packet output interface kind name (dev->rtnl_link_ops->kind)
>    * @NFT_META_BRI_IIFPVID: packet input bridge port pvid
>    * @NFT_META_BRI_IIFVPROTO: packet input bridge vlan proto
> + * @NFT_META_TIME: a UNIX timestamp
> + * @NFT_META_TIME_DAY: day of week
> + * @NFT_META_TIME_HOUR: hour of day
>    */
>   enum nft_meta_keys {
>   	NFT_META_LEN,
> @@ -829,8 +832,9 @@ enum nft_meta_keys {
>   	NFT_META_SECPATH,
>   	NFT_META_IIFKIND,
>   	NFT_META_OIFKIND,
> -	NFT_META_BRI_IIFPVID,
> -	NFT_META_BRI_IIFVPROTO,

I needed to remove these two so that the next three constants take the 
correct values (otherwise it won't work because the meta keys sent by 
userspace and those expected by the kernel don't match).

Those two constants NFT_META_BRI_IIFPVID and NFT_META_BRI_IIFVPROTO 
aren't defined in nftables, I don't know why.

I leave up to you to decide how to merge this: either manually give 
NFT_META_TIME the correct value, or replicate NFT_META_BRI_IIFPVID and
NFT_META_BRI_IIFVPROTO in nftables.

> +	NFT_META_TIME,
> +	NFT_META_TIME_DAY,
> +	NFT_META_TIME_HOUR,
>   };
>   
>   /**


  reply	other threads:[~2019-08-02  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02  7:12 [PATCH v3] netfilter: nft_meta: support for time matching Ander Juaristi
2019-08-02  7:36 ` Ander Juaristi [this message]
2019-08-02  9:37   ` Florian Westphal
2019-08-07 14:04 ` kbuild test robot
2019-08-07 15:27 ` kbuild test robot
2019-08-07 17:14 ` kbuild test robot
2019-08-09 11:49 ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55c6fec8-6c1d-174e-942e-b3f3d6f53542@juaristi.eus \
    --to=a@juaristi.eus \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).