diff options
author | Phil Sutter <phil@nwl.cc> | 2024-03-07 13:25:31 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-04-11 01:27:07 +0200 |
commit | 410c245e4811d7888daa456547af58d93d1c63b4 (patch) | |
tree | 2fcc85873745dfe6df575fabaa29da81c085a411 /src/obj/ct_timeout.c | |
parent | df4e259c0537fff58ecdc7b3ec1546fb2da93968 (diff) |
obj: Call obj_ops::set with legal attributes only
Refer to obj_ops::nftnl_max_attr field value for the maximum supported
attribute value to reject invalid ones upfront.
Consequently drop default cases from callbacks' switches which handle
all supported attributes.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/obj/ct_timeout.c')
-rw-r--r-- | src/obj/ct_timeout.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/obj/ct_timeout.c b/src/obj/ct_timeout.c index ee86231..011d928 100644 --- a/src/obj/ct_timeout.c +++ b/src/obj/ct_timeout.c @@ -162,8 +162,6 @@ static int nftnl_obj_ct_timeout_set(struct nftnl_obj *e, uint16_t type, memcpy(timeout->timeout, data, sizeof(uint32_t) * NFTNL_CTTIMEOUT_ARRAY_MAX); break; - default: - return -1; } return 0; } |