Re: [nf-next 2/3] netfilter: Add support for IPv6 segment routing 'SEG6' target

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

 



Ahmed Abdelsalam <amsalam20@xxxxxxxxx> wrote:
> +static int seg6_check(const struct xt_tgchk_param *par)
> +{
> +	/**
> +	 * In the future, some new action may require using
> +	 * this function for doing some checks
> +	 */

Please add add a check on seg6->action and return -EOPNOSTUPP
in case it cannot be handled.

If possible, also sanity check other target parameters.
Otherwise newer userspace version can't be sure kernel
will actually know how to act on whatever action they've requested.

This will also allow you to remove the pr_err() call from the
evaluation function.



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

  Powered by Linux