Skip to content

Commit 1e3790a

Browse files
committed
Merge branch 'develop'
2 parents 2eae3c4 + e3e019e commit 1e3790a

22 files changed

+182
-26
lines changed

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ In no particular order, we would like to thank the following people:
1616
* Tyler Marriner for adding support for encrypting inter-component
1717
communications using TLS and adding RabbitMQ support to the collector.
1818
* Neil Tapp for pointing out many bugs and logging inaccuracies.
19+
* Pim van Stam for contributing code to support the "agencycountrycode"
20+
configuration option, as well as handling of certain NL-specific
21+
requirements.
1922

2023
Apologies to anyone that has made a contribution but we've forgotten to
2124
mention you here -- if this has happened to you, please get in touch with the

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OpenLI -- open source ETSI-compliant Lawful Intercept software
22

3-
Version: 1.1.7
3+
Version: 1.1.8
44

55
---------------------------------------------------------------------------
66

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Super primitive configure script
22

3-
AC_INIT([openli],[1.1.7],[[email protected]])
3+
AC_INIT([openli],[1.1.8],[[email protected]])
44

55
AM_INIT_AUTOMAKE([subdir-objects])
66
AC_CONFIG_SRCDIR(src/collector/collector.c)

debian/changelog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
openli (1.1.8-1) unstable; urgency=medium
2+
3+
* Collector: fix crash in sync_voip thread if an invalid SIP packet
4+
is encountered.
5+
* Collector: add a single zero byte to the list of recognised SIP
6+
keep alives.
7+
* Collector: fix crash that can occur if an IP is mapped to a
8+
RADIUS session more than once.
9+
* Add config option to specify the country where an agency has
10+
jurisdiction, which allows us to support country-specific
11+
requirements for HI1 operations and keep alive messages.
12+
* Keep alive messages for NL agencies now conform to the ETSI-IP.nl
13+
requirements.
14+
* Use '--' instead of 'NA' as the auth and delivery country code for
15+
keep alives when we do not know the country code for the receiving
16+
agency.
17+
18+
-- Shane Alcock <[email protected]> Wed, 14 Aug 2024 10:13:28 +1200
19+
120
openli (1.1.7-1) unstable; urgency=medium
221

322
* Collector: fix file descriptor leak caused by timers in SMS worker

doc/ProvisionerDoc.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ Agencies are expressed as a YAML sequence with a key of `agencies:`. Each
439439
sequence item represents a single agency and must contain the following
440440
key-value elements:
441441
* `agencyid` -- the unique internal identifier for this agency
442+
* `agencycountrycode` -- the 2-letter ISO 3166 country code for the country
443+
where the agency is located.
442444
* `hi2address` -- the address of the HI2 handover on the agency side
443445
* `hi2port` -- the port number for the HI2 handover on the agency side
444446
* `hi3address` -- the address of the HI3 handover on the agency side

doc/exampleconfigs/running-intercept-example.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ defaultradiususers:
6161
agencies:
6262

6363
- agencyid: "Police" # id must be unique per agency
64+
agencycountrycode: "NZ" # 2 letter country code (ISO 3166) matching the
65+
# agency's jurisdiction
6466
hi2address: 192.168.200.1 # address of the HI2 service at the agency
6567
hi2port: 35530 # port number of the HI2 service at the agency
6668
hi3address: 192.168.200.1 # address of the HI3 service at the agency
@@ -71,6 +73,8 @@ agencies:
7173
# 30 seconds to avoid being disconnected
7274

7375
- agencyid: "Spooks" # id must be unique per agency
76+
agencycountrycode: "NZ" # 2 letter country code (ISO 3166) matching the
77+
# agency's jurisdiction
7478
hi2address: 10.10.1.1 # address of the HI2 service at the agency
7579
hi2port: 7001 # port number of the HI2 service at the agency
7680
hi3address: 10.10.1.2 # address of the HI3 service at the agency

rpm/openli.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: openli
2-
Version: 1.1.7
2+
Version: 1.1.8
33
Release: 1%{?dist}
44
Summary: Software for performing ETSI-compliant lawful intercept
55

@@ -283,6 +283,9 @@ fi
283283

284284

285285
%changelog
286+
* Thu Jul 25 2024 Shane Alcock <[email protected]> - 1.1.8-1
287+
- Updated for 1.1.8 release
288+
286289
* Tue Jul 23 2024 Shane Alcock <[email protected]> - 1.1.7-1
287290
- Updated for 1.1.7 release
288291

src/agency.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ void free_liagency(liagency_t *lea) {
4343
if (lea->agencyid) {
4444
free(lea->agencyid);
4545
}
46+
if (lea->agencycc) {
47+
free(lea->agencycc);
48+
}
4649
free(lea);
4750
}
4851

src/agency.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ typedef struct liagency {
3939
char *hi3_ipstr;
4040
char *hi3_portstr;
4141
char *agencyid;
42+
char *agencycc;
4243
uint32_t keepalivefreq;
4344
uint32_t keepalivewait;
4445
} liagency_t;
@@ -48,7 +49,10 @@ typedef struct liagency {
4849
(strcmp(a->hi2_portstr, b->hi2_portstr) == 0) && \
4950
(strcmp(a->hi3_ipstr, b->hi3_ipstr) == 0) && \
5051
(strcmp(a->hi3_portstr, b->hi3_portstr) == 0) && \
51-
(strcmp(a->agencyid, b->agencyid) == 0))
52+
(strcmp(a->agencyid, b->agencyid) == 0) && \
53+
((a->agencycc == NULL && b->agencycc == NULL) || \
54+
(a->agencycc != NULL && b->agencycc != NULL && \
55+
strcmp(a->agencycc, b->agencycc) == 0)))
5256

5357
#endif
5458

src/collector/collector_sync.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,7 @@ static inline int report_silent_logoffs(collector_sync_t *sync,
20002000
if (remove_session_ip(prev->session[i], &(prev->ip)) == 1) {
20012001
HASH_DELETE(hh, prev->owner[i]->sessions, prev->session[i]);
20022002
free_single_session(prev->session[i]);
2003+
prev->session[i] = NULL;
20032004
}
20042005
}
20052006
HASH_DELETE(hh, sync->activeips, prev);
@@ -2012,7 +2013,7 @@ static inline int report_silent_logoffs(collector_sync_t *sync,
20122013
static int add_ip_to_session_mapping(collector_sync_t *sync,
20132014
access_session_t *sess, internet_user_t *iuser) {
20142015

2015-
int i, replaced = 0;
2016+
int i, j, replaced = 0;
20162017
ip_to_session_t *prev;
20172018

20182019
prev = NULL;
@@ -2028,6 +2029,21 @@ static int add_ip_to_session_mapping(collector_sync_t *sync,
20282029
sizeof(internetaccess_ip_t), prev);
20292030

20302031
if (prev && prev->cin == sess->cin) {
2032+
int already = 0;
2033+
for (j = 0; j < prev->sessioncount; j++) {
2034+
if (prev->session[j] == sess) {
2035+
already = 1;
2036+
break;
2037+
}
2038+
}
2039+
2040+
/* This IP->session mapping is already known (somehow?),
2041+
* don't insert it twice because that can cause issues
2042+
* if we have to do a silent-logoff later on */
2043+
if (already) {
2044+
continue;
2045+
}
2046+
20312047
prev->session = realloc(prev->session,
20322048
(prev->sessioncount + 1) * sizeof(access_session_t *));
20332049
prev->owner = realloc(prev->owner,

0 commit comments

Comments
 (0)