diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2023-06-28 10:47:32 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2023-07-26 01:09:17 +0000 |
commit | 0028e6f31624246e831b5b1a13dc46ab1d864fa7 (patch) | |
tree | 5e20818e09e5eb269a785770b1166d7ead129eec /src/vnet/session/session_lookup.c | |
parent | cc8249c5fde1b00b043066617d35325dd1606cd6 (diff) |
session: use session error type instead of vnet error
Type: improvement
Change-Id: Ie0bad9e03ac2e29da23af01ee7f63cb44489ad9c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/session/session_lookup.c')
-rw-r--r-- | src/vnet/session/session_lookup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c index 68f98d0f046..a8845996a08 100644 --- a/src/vnet/session/session_lookup.c +++ b/src/vnet/session/session_lookup.c @@ -1311,8 +1311,8 @@ session_lookup_connection (u32 fib_index, ip46_address_t * lcl, lcl_port, rmt_port, proto); } -int -vnet_session_rule_add_del (session_rule_add_del_args_t * args) +session_error_t +vnet_session_rule_add_del (session_rule_add_del_args_t *args) { app_namespace_t *app_ns = app_namespace_get (args->appns_index); session_rules_table_t *srt; @@ -1322,14 +1322,14 @@ vnet_session_rule_add_del (session_rule_add_del_args_t * args) int rv = 0; if (!app_ns) - return VNET_API_ERROR_APP_INVALID_NS; + return SESSION_E_INVALID_NS; if (args->scope > 3) - return VNET_API_ERROR_INVALID_VALUE; + return SESSION_E_INVALID; if (args->transport_proto != TRANSPORT_PROTO_TCP && args->transport_proto != TRANSPORT_PROTO_UDP) - return VNET_API_ERROR_INVALID_VALUE; + return SESSION_E_INVALID; if ((args->scope & SESSION_RULE_SCOPE_GLOBAL) || args->scope == 0) { |