From 6228b859ba73e83ddda1352092a8c609542ea02b Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 13 Sep 2018 17:41:54 +0200 Subject: nat: return -EBADF in read wqueue cb on fd closed bsc_msc_lost will close the current fd (without freeing it), so let's skip possible writes to an already closed fd bsc_msc_lost will close the current fd (without freeing it), so let's skip possible writes to an already closed fd.. Change-Id: I55c1a88f6524e897c70abf8ba18f1bb2b1f650aa --- openbsc/src/osmo-bsc_nat/bsc_nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src') diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 8cc0f2d3e..c8a9e74e9 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -864,7 +864,7 @@ static int ipaccess_msc_read_cb(struct osmo_fd *bfd) msc_con->name, ret); bsc_msc_lost(msc_con); - return -1; + return -EBADF; } LOGP(DNAT, LOGL_DEBUG, -- cgit v1.2.3