Hi,
I have Content Filter simple firewall app. I am dropping SSH connection as part my app as per my policy evaluation result and I am expecting my custom error type EACCES(permission denied) whenever user tries SSH But drop() is returning with EBADF (Bad file descriptor).
Is it possible to return my custom error type as part of drop()?
Below is sample code I have.
I have Content Filter simple firewall app. I am dropping SSH connection as part my app as per my policy evaluation result and I am expecting my custom error type EACCES(permission denied) whenever user tries SSH But drop() is returning with EBADF (Bad file descriptor).
Is it possible to return my custom error type as part of drop()?
Below is sample code I have.
Code Block override func handleNewFlow(_ flow: NEFilterFlow) -> NEFilterNewFlowVerdict { DispatchQueue.global(qos: .default).async { // errortype is EACCES for drop case and errorType is 0 for allow case userVerdict = errortype == 0 ? .allow() : .drop() self.resumeFlow(flow, with: userVerdict) } return .pause() }