Project

General

Profile

Feature #2841

VTY command to list unauthorized BTSs

Added by laforge 9 months ago. Updated about 12 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Start date:
01/18/2018
Due date:
% Done:

0%

Spec Reference:

Description

It would be useful in practical deployments to have a "show ..." command in the vty that shows a list of BTSs that recently tried to connect, even if they were rejected. IT should indicated their IP + Unit ID.

History

#1 Updated by laforge 24 days ago

  • Assignee set to osmith

So the point here is that there may be BTSs with unit-ids that are not known to / configured in the BSC. The BSC so far simply closes the TCP connection and logs this somehow.

From a UI point of view it would be nice to have something like "ring buffer" of the last N (let's say 25?) unknown BTSs that tried to connect, and have a VTY command to "show" that.

So basically I'd suggest linked list (llist_head) of records containing source-ip, unit-id and timestamp. The list should be limited in length, expiring the oldest record first. And if a record for the given unit-id+IP tuple already exists, only the timestamp is updated. But the details are up to you!

#2 Updated by osmith about 17 hours ago

  • Status changed from New to In Progress

#3 Updated by osmith about 14 hours ago

It would probably be useful to have the list sorted by the timestamp in the output.

From what I understand, llist is taken from the Linux source code. Linux has list_sort():

https://github.com/torvalds/linux/blob/master/include/linux/list_sort.h
https://github.com/torvalds/linux/blob/master/lib/list_sort.c

How about we add that to libosmocore?

#4 Updated by laforge about 12 hours ago

On Tue, Oct 23, 2018 at 02:46:07PM +0000, osmith [REDMINE] wrote:

It would probably be useful to have the list sorted by the timestamp in the output.

possibly.

From what I understand, llist is taken from the Linux source code. Linux has list_sort():

Rather than sorting the list every time you show it, I would simply do a sorted insert. So basically, on every new connection:

  • iterate list to find if existing entry.
    • if yes: unlink it
    • if not: allocate new entry
  • update timestamp of entry
  • do sorted insert by walking the list from front or back, and comparing timestamps

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)