tools/gtp-tunnel: pass rc of gtp_del_tunnel

Don't exit with 0 if gtp_del_tunnel fails.

Change-Id: I8046a57a5831e6bdee2ac37415380ce391c79c22
This commit is contained in:
Oliver Smith 2024-02-21 09:58:56 +01:00
parent 170337196b
commit c95db93512
1 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,7 @@ del_tunnel(int argc, char *argv[], int genl_id, struct mnl_socket *nl)
{
struct gtp_tunnel *t;
uint32_t gtp_ifidx;
int ret;
if (argc != 6) {
printf("%s del <gtp device> <version> <tid|i_tei> <family>\n",
@ -171,10 +172,10 @@ del_tunnel(int argc, char *argv[], int genl_id, struct mnl_socket *nl)
return EXIT_FAILURE;
}
gtp_del_tunnel(genl_id, nl, t);
ret = gtp_del_tunnel(genl_id, nl, t);
gtp_tunnel_free(t);
return 0;
return ret;
}
struct gtp_pdp {