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

olsrd: switch to firewall4 #812

Merged
merged 1 commit into from
Mar 6, 2022

Conversation

PolynomialDivision
Copy link
Member

Firewall4 uses nftables instead of iptables. Use iptables-nft for installing smart-gw-rules.

Fixes: #731 ("Certain upstream switch to firewall4 aka nftables instead of iptables")

@PolynomialDivision PolynomialDivision changed the title olsrd: switch to firewall4 [WIP] olsrd: switch to firewall4 Feb 27, 2022
@PolynomialDivision
Copy link
Member Author

I don't use smart gateway. Can anyone test?

@PolynomialDivision PolynomialDivision changed the title [WIP] olsrd: switch to firewall4 olsrd: switch to firewall4 Feb 27, 2022
@@ -746,8 +746,8 @@ olsrd_setup_smartgw_rules() {
nowan=0
fi

IP4T="$( command -v iptables )"
IP6T="$( command -v ip6tables )"
IP4T="$( command -v iptables-nft )"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not seems to be necessary.

root@turris:~# iptables
iptables v1.8.7 (nf_tables): no command specified
Try `iptables -h' or 'iptables --help' for more information.

olsrd/Makefile Outdated
@@ -34,7 +34,7 @@ endef
define Package/olsrd
$(call Package/olsrd/template)
MENU:=1
DEPENDS:=+libpthread +libubus
DEPENDS:=+libpthread +libubus +iptables-nft +ip6tables-nft
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks compatibility with fw3. By quick looking at commit openwrt/openwrt@795e715 it should be enough to add iptables and iptables6 w/o any suffix. :)

olsrd/Makefile Outdated
@@ -34,7 +34,7 @@ endef
define Package/olsrd
$(call Package/olsrd/template)
MENU:=1
DEPENDS:=+libpthread +libubus
DEPENDS:=+libpthread +libubus +iptables-nft +ip6tables-nft
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks compatibility with fw3. By quick looking at commit openwrt/openwrt@795e715 it should be enough to add iptables and iptables6 w/o any suffix. :)

@PolynomialDivision
Copy link
Member Author

Thanks! Changed it.

@BKPepe
Copy link
Member

BKPepe commented Mar 5, 2022

Commit subject and commit description should be changed.

@PolynomialDivision
Copy link
Member Author

Did that.

@BKPepe
Copy link
Member

BKPepe commented Mar 6, 2022

What about this? I wouldn't say I like copy&pasting commit messages from different commits and also the references always begin with 1 instead of 0.

The upcoming OpenWrt version (currently in the master branch) ships firewall4 by default [1], which uses nftables instead of iptables. 

Users might choose to use a compatible layer [2] with iptables-nft, decide which iptables they want to use, and make appropriate changes related to fw3/f4[3].

This package requires to use iptables (no matter which variant) for smart-gw-rules 

[1] https://github.com/openwrt/openwrt/commit/08d9f6e3020b4a149b2007b6ed7d684c49af9bbf

[2] https://www.redhat.com/en/blog/using-iptables-nft-hybrid-linux-firewall

[3] https://github.com/openwrt/openwrt/commit/795e7155cbe3e78669f6821bf7aecb7c4e1e1afb

Feel free to rewrite it based on your thoughts.

From my point of view, you should not use any Fixes: or any other keyword in the commit message since when you have it there and you will do force-push, you will only spam issue with mentions. You should rather put it to the pull request.

The upcoming OpenWrt version (currently in the master branch) ships
firewall4 by default [1], which uses nftables instead of iptables.

Users might choose to use a compatible layer [2] with iptables-nft,
decide which iptables they want to use, and make appropriate changes
related to fw3/f4[3].

This package requires to use iptables (no matter which variant) for
smart-gw-rules.

[1] openwrt/openwrt@08d9f6e
[2] https://www.redhat.com/en/blog/using-iptables-nft-hybrid-linux-firewall
[3] openwrt/openwrt@795e715

Signed-off-by: Nick Hainke <[email protected]>
@PolynomialDivision
Copy link
Member Author

Sounds awesome! :)

@PolynomialDivision PolynomialDivision merged commit d5a7e52 into openwrt:master Mar 6, 2022
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.

Certain upstream switch to firewall4 aka nftables instead of iptables
2 participants