Re: [PATCH nf-next] netfilter: nf_tables: add vlan support

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

 



On 10/18/2019 6:24 PM, Florian Westphal wrote:
> wenxu@xxxxxxxxx <wenxu@xxxxxxxxx> wrote:
>> From: wenxu <wenxu@xxxxxxxxx>
>>
>> This patch implements the vlan expr type that can be used to
>> configure vlan tci and vlan proto
> Looks like a very small module with no external dependencies,
> I think you could make this a nft-builtin feature and just add
> nft_vlan.o to 'nf_tables-objs' in net/netfilter/Makefile, similar to
> nft_rt.
>
> What do you think?
>
> If you plan to extend this in the future then I'm fine with keeping it
> as a module.
It can add vlan tci / proto "get" expr and It also can support offload things in the future.
>> +static int nft_vlan_set_init(const struct nft_ctx *ctx,
>> +			     const struct nft_expr *expr,
>> +			     const struct nlattr * const tb[])
>> +{
>> +	struct nft_vlan *priv = nft_expr_priv(expr);
>> +	int err;
> I think you need to add
>
> 	if (!tb[NFTA_VLAN_ACTION] ||
> 	    !tb[NFTA_VLAN_SREG] ||
> 	    !tb[NFTA_VLAN_SREG2])
> 		return -EINVAL;
Will do.
>
> Other than that this looks good to me.
>



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux