Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nftables: Add more operations and raise kernel errors #902

Merged
merged 4 commits into from
Apr 24, 2022

Commits on Apr 23, 2022

  1. nlsocket: Implement improved batch handling

    Currently, the handling of batch messages is difficult as nlm_request
    sends each message separately and listens for responses from a single
    message sequence number only. Therefore, this commit introduces
    `nlm_request_batch`, which can be supplied with a list of messages. The
    function will then listen for expected responses for any of the supplied
    messages and return/yield them to the caller.
    
    In the future, this will allow for improved error handling. Since some
    nftables write operations require batches, the current approach is to
    accumulate messages in a batch and send them to the socket in a
    fire-and-forget manner. This causes errors reported by the kernel to go
    unnoticed.
    
    This commit prepares improved error handling for nftables by allowing to
    read those errors. It is related to issue svinota#892.
    blechschmidt committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    39741a4 View commit details
    Browse the repository at this point in the history
  2. nftables: Add more operations and raise errors reported by kernel

    This commit adds more nftables operations and uses `nlm_request_batch`
    to raise errors that are reported by the kernel. With this commit,
    errors, e.g. caused by invalid rule expressions or missing NLAs, will no
    longer go unnoticed.
    blechschmidt committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    729de2d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7bb9e85 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    40edd81 View commit details
    Browse the repository at this point in the history