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/tunnel.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/tunnel.c')
-rw-r--r-- | src/obj/tunnel.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/obj/tunnel.c b/src/obj/tunnel.c index 19a3639..72985ee 100644 --- a/src/obj/tunnel.c +++ b/src/obj/tunnel.c @@ -76,8 +76,6 @@ nftnl_obj_tunnel_set(struct nftnl_obj *e, uint16_t type, case NFTNL_OBJ_TUNNEL_ERSPAN_V2_DIR: memcpy(&tun->u.tun_erspan.u.v2.dir, data, sizeof(tun->u.tun_erspan.u.v2.dir)); break; - default: - return -1; } return 0; } |