aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2020-12-02 18:59:44 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2020-12-03 15:14:18 +0100
commit751977be6fa36ca56d8ad05274ecbd366696973e (patch)
tree7c97ddfb97d1d88747373fcee9ac03aeafa5377a /src/gb/gprs_ns2.c
parentd87a2f14e630fadb8560d8d21900a2d01c795238 (diff)
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
Diffstat (limited to 'src/gb/gprs_ns2.c')
-rw-r--r--src/gb/gprs_ns2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 69c1174e..93807f00 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 @@ int ns2_recv_vc(struct gprs_ns2_vc *nsvc,
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;