Skip to content

Conversation

@xrm
Copy link

@xrm xrm commented Oct 5, 2025

As previously seen on linuxmuster#172

Changes that make it possible to ... :

... give a list of IPs/networks that should be ignored in sophomorix-query.
... give a "prefered" IP, i.e. one, that will be preferred if there are multiple connections for a user.
The first option is used to block out any servers that open SMB connections on behalf of the user (for example Nextcloud servers) and that should be ignored when determining the user's room.

The second option can be used by the WebUI (PR will follow if/when this PR is accepted) to pass the user's IP address to the script. If a user has a SMB connection from that IP, it will be used for room detection, else it will be ignored.

Notes on the PR:

not sure if I correctly added the dependency on libnetaddr-ip-perl. If not, I'll happily adjust it.
The list of IPs/networks is currently hardcoded to reside within /etc/linuxmuster/sophomorix/sophomorix-query.ignored_nets.txt. It is most likely better pratice to store this in sophomorix_config but I am unsure on how to add it there.
Related links: https://ask.linuxmuster.net/t/konsole-aktueller-raum-durch-nextcloud-irritiert/10438/4

I am not sure if this is helpful at all as I am neither used to write Perl nor skilled in the LMN-coding style. I do hope it is, but sorry if not ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant