4 Commits
0.2.0 ... 0.2.1

Author SHA1 Message Date
Harald Welte
493845d8e4 Bump version: 0.2.0.3-d6a3 → 0.2.1
Change-Id: I305be54bf1abadeabfa77b7c3a2879e824075afe
2021-02-16 22:39:23 +01:00
Harald Welte
d6a3728bce cbc-apitool: compatibility with python < 3.7
The "required" parameter to argparse.add_subparsers() was only
added in python 3.7.  However, given that it defaults to 'required'
and was always unconditionally required even in python 2.x,
we can safely remove it.

Change-Id: Ia0ffca055f47016fb29ef009acecac2a139e4077
2021-02-16 22:12:10 +01:00
Oliver Smith
e8ab2f3148 configure.ac: set -std=gnu11
Change-Id: I8fe45ab98a2a000a428a17d586f4dd4f1ba5f2d6
2021-01-28 10:48:47 +00:00
Harald Welte
e74594b247 VTY: don't save dynamically-allocated "unknown" peers
The VTY code should write/save only those peers that were configured
using the VTY.

Closes: OS#4929
Change-Id: If02694be4e4cb9cb27e7d9d07e533bfed4a999a9
2021-01-24 23:29:03 +01:00
6 changed files with 21 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_TESTDIR(tests)
CFLAGS="$CFLAGS -std=gnu11"
dnl kernel style compile messages
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

View File

@@ -117,7 +117,7 @@ def main(argv):
parser.add_argument("-p", "--port", help="TCP port to connect to", default=12345)
parser.add_argument("-v", "--verbose", help="increase output verbosity", action='count', default=0)
subparsers = parser.add_subparsers(required=True)
subparsers = parser.add_subparsers()
parser_c_cbs = subparsers.add_parser('create-cbs', help='Create a new CBS message')
parser_c_cbs.add_argument("--msg-id", type=int, help='Message Identifier', required=True)

11
debian/changelog vendored
View File

@@ -1,3 +1,14 @@
osmo-cbc (0.2.1) unstable; urgency=medium
[ Harald Welte ]
* VTY: don't save dynamically-allocated "unknown" peers
* cbc-apitool: compatibility with python < 3.7
[ Oliver Smith ]
* configure.ac: set -std=gnu11
-- Harald Welte <laforge@osmocom.org> Tue, 16 Feb 2021 22:39:23 +0100
osmo-cbc (0.2.0) unstable; urgency=medium
[ Harald Welte ]

View File

@@ -26,6 +26,7 @@ struct cbc_peer {
char *remote_host; /* remote IP address in string format */
int remote_port; /* remote port number or -1 for random */
bool unknown_dynamic_peer; /* dynamic/unknown peer; not saved in VTY */
enum cbc_peer_protocol proto;
union {

View File

@@ -494,8 +494,12 @@ static void write_one_peer(struct vty *vty, struct cbc_peer *peer)
static int config_write_peer(struct vty *vty)
{
struct cbc_peer *peer;
llist_for_each_entry(peer, &g_cbc->peers, list)
llist_for_each_entry(peer, &g_cbc->peers, list) {
/* only save those configured via the VTY, not the "unknown" peers */
if (peer->unknown_dynamic_peer)
continue;
write_one_peer(vty, peer);
}
return CMD_SUCCESS;
}

View File

@@ -150,6 +150,7 @@ static int cbsp_cbc_accept_cb(struct osmo_stream_srv_link *link, int fd)
remote_ip, remote_port);
client->peer = cbc_peer_create(NULL, CBC_PEER_PROTO_CBSP);
OSMO_ASSERT(client->peer);
client->peer->unknown_dynamic_peer = true;
} else {
LOGPCC(client, LOGL_NOTICE, "Rejecting unknown CBSP peer %s:%d (not permitted)\n",
remote_ip, remote_port);