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

Be able to use other network device in iptables #601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wb14123
Copy link
Contributor

@wb14123 wb14123 commented Oct 29, 2024

In net/iptables, it uses the network device eth0 for network operations. But the network device may be different on some machines. So create a function to accept a network device parameter.

In `net/iptables`, it uses the network device `eth0` for network
operations. But the network device may be different on some machines. So
create a function to accept a network device parameter.
@aphyr
Copy link
Collaborator

aphyr commented Oct 29, 2024

I would say... let's promote this from a reify to a full (defrecord IPTables [dev ...] ...). It'll be more friendly for printing. We can't get away from the static (def iptables) without breaking compatibility, but it might make sense to add (defn iptables* [option-map] ...) as an underlying constructor--that'll set the groundwork for breaking compat in a later release.

Or, if you just need a one-off, you can reify your own implementation of net in your test. I'm for parameterizing the device though! I haven't needed it so far but it makes total sense.

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