lkml.org 
[lkml]   [2020]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v5 04/10] bridge: cfm: Kernel space implementation of CFM. MEP create/delete.
On Mon, 12 Oct 2020 14:04:22 +0000 Henrik Bjoernlund wrote:
> + if (config->mdlevel > 7) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "MD level is invalid");
> + return -EINVAL;
> + }
> + /* The MEP-ID is a 13 bit field in the CCM PDU identifying the MEP */
> + if (config->mepid > 0x1FFF) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "MEP-ID is invalid");
> + return -EINVAL;
> + }

If I'm reading patch 7 correctly these parameters come from netlink,
right? In that case please use the netlink policies to check things
like ranges or correct values.

\
 
 \ /
  Last update: 2020-10-15 01:30    [W:0.147 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site