lib/gtp-kernel.c: check rc of in46a_from_eua

Fixes: b17fe7bf ("kernel-gtp: support IPv6 on inner layer")
Change-Id: I40e4de1517de8871224a45c173208810b42312ff
This commit is contained in:
Oliver Smith 2024-02-27 16:04:42 +01:00
parent 768d6d5be9
commit ec357c5377
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,8 @@ int gtp_kernel_tunnel_add(struct pdp_t *pdp, const char *devname)
in46a_from_gsna(&pdp->gsnrc, &sgsn);
ms_addr_count = in46a_from_eua(&pdp->eua, ms);
if (ms_addr_count < 0)
return -1;
for (int i = 0; i < ms_addr_count; i++) {
t = gtp_tunnel_alloc();
@ -169,6 +171,8 @@ int gtp_kernel_tunnel_del(struct pdp_t *pdp, const char *devname)
pdp_debug(__func__, devname, pdp);
ms_addr_count = in46a_from_eua(&pdp->eua, ms);
if (ms_addr_count < 0)
return -1;
for (int i = 0; i < ms_addr_count; i++) {
t = gtp_tunnel_alloc();