Skip to content

Conversation

@DemiMarie
Copy link
Contributor

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

qubesdb-exists will be used in the firewall code to check if a given
network device is going to be part of a bridge or not.
@marmarek
Copy link
Member

Why not simply qubesdb-read and look at its exit code? Separate tool for this seems to be an overkill.

@DemiMarie
Copy link
Contributor Author

This approach is less error-prone. On success, one gets either true (exists) or false (missing) and an exit status of 0. On failure, one gets a nonzero exit status.

@marmarek
Copy link
Member

marmarek commented Mar 6, 2023

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

Can you be a bit more specific? Don't you need to read a value anyway?

@DemiMarie
Copy link
Contributor Author

qubesdb-exists will be used in the firewall code to check if a given network device is going to be part of a bridge or not.

Can you be a bit more specific? Don't you need to read a value anyway?

I need to check if an interface is managed by @fepitre’s bridge extension. My current plan is to have that extension use a specific qubesdb entry (currently /net-config/$MAC/custom) to indicate that it is managed by something other than the normal logic. The value doesn’t matter.

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.

2 participants