[PATCH 3/8] nat: Close the connection after we couldn't find the user

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Mon Jun 15 09:55:37 UTC 2015


From: Holger Hans Peter Freyther <holger at moiji-mobile.com>

In case the token was not correct, just close the connection.
It is not clear that forcing a new TCP connection is going to
give us any extra security here. But with the upcoming auth
handling it does make sense to have both case look similar.
---
 openbsc/src/osmo-bsc_nat/bsc_nat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index 2f186b2..9216654 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -985,6 +985,7 @@ static void ipaccess_auth_bsc(struct tlv_parsed *tvp, struct bsc_connection *bsc
 		LOGP(DNAT, LOGL_ERROR,
 			"No bsc found for token '%s' on fd: %d.\n", token,
 			bsc->write_queue.bfd.fd);
+		bsc_close_connection(bsc);
 		return;
 	}
 
-- 
2.3.5




More information about the OpenBSC mailing list