]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_tunnel_key: disambiguate metadata dst error cases
authorSimon Horman <simon.horman@netronome.com>
Wed, 27 Jun 2018 04:39:34 +0000 (21:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Jun 2018 14:50:26 +0000 (23:50 +0900)
commiteca3f53a2885d4162448d5b870a220fc8dd64cee
tree166dca63ebaed139bc2087dd54e17263c7d21e24
parent0eaa588c06a5c49b6e859a45929d7bd4203293ba
net/sched: act_tunnel_key: disambiguate metadata dst error cases

Metadata may be NULL for one of two reasons:
* Missing user input
* Failure to allocate the metadata dst

Disambiguate these case by returning -EINVAL for the former and -ENOMEM
for the latter rather than -EINVAL for both cases.

This is in preparation for using extended ack to provide more information
to users when parsing their input.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_tunnel_key.c