mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-cbc.git
synced 2025-11-02 21:23:37 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
493845d8e4 | ||
|
|
d6a3728bce | ||
|
|
e8ab2f3148 | ||
|
|
e74594b247 |
@@ -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])])
|
||||
|
||||
|
||||
@@ -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
11
debian/changelog
vendored
@@ -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 ]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user