Skip to content

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.

@wb14123
Copy link
Contributor Author

wb14123 commented Nov 24, 2024

@aphyr is there anything else you want to add to IPTables other than dev?

@aphyr
Copy link
Collaborator

aphyr commented Dec 3, 2024

No, I think this should basically be good to go. I would like to see this as a defrecord (I can make that change if that's at all tricky for you), but otherwise we're set.

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