ns2: Add log filtering by NSE/NSEI, fix NSVC filter on receive
NSVC filtering was only implemented on sending messages, this also adds
log_set_context() calls to ns2_recv_vc()
Filtering by NSE is implemented similar to NSVC.
Change-Id: I63c0e85f82f5d08c5a6f535da94b8648498439d2
Related: SYS#5232
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 69c1174..93807f0 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -72,6 +72,7 @@
#include <arpa/inet.h>
#include <osmocom/core/fsm.h>
+#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/socket.h>
@@ -1010,6 +1011,9 @@
struct tlv_parsed tp;
int rc = 0;
+ log_set_context(LOG_CTX_GB_NSE, nsvc->nse);
+ log_set_context(LOG_CTX_GB_NSVC, nsvc);
+
if (msg->len < sizeof(struct gprs_ns_hdr))
return -EINVAL;