summaryrefslogtreecommitdiffstats
path: root/gisi
diff options
context:
space:
mode:
Diffstat (limited to 'gisi')
-rw-r--r--gisi/pep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gisi/pep.c b/gisi/pep.c
index f1ff5898..bea19024 100644
--- a/gisi/pep.c
+++ b/gisi/pep.c
@@ -148,6 +148,8 @@ unsigned g_isi_pep_get_ifindex(const GIsiPEP *pep)
char *g_isi_pep_get_ifname(const GIsiPEP *pep, char *ifname)
{
- unsigned ifi = g_isi_pep_get_ifindex(pep);
- return if_indextoname(ifi, ifname);
+ if (pep->gprs_fd == -1)
+ return NULL;
+
+ return if_indextoname(g_isi_pep_get_ifindex(pep), ifname);
}