-
Notifications
You must be signed in to change notification settings - Fork 3.8k
miniupnpd: Update to 2.3.7 and enable regex filter #24495
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
Conversation
|
Hilarious. So several days ago, I got an email with a similar changeset that ended up in my spam folder for whatever reason. My suspicion is someone does not want to use a real name. |
|
Interesting. Line 21 in 10644ca
Why my name suddenly becomes 'not my real name'. |
|
Commit description is missing for both commits according to https://openwrt.org/submitting-patches. Would be good to know why do we need to enable regex filter and also the size difference of that package. |
Update to 2.3.7, and remove patches which are already in upstream. Signed-off-by: David Yang <mmyangfl@gmail.com>
UPnP rules now may have an optional regex filter on requester's descriptions. This is a countermeasure against some UPnP exploiters without shutting down UPnP service completely, albeit they can bypass it by reporting innocent's descriptions maliciously. Since the filter specifier is optional, existing valid config files will still work. This increases the executable's size by 1.3 kB from original 147.7 kB on i386. Signed-off-by: David Yang <mmyangfl@gmail.com>
|
seems good to go |
|
@yangfl: Thanks! Linked to: |
|
Hi @yangfl A few minor comments on the implemented PR that I consider important:
|
|
Actually, it works - by not working. It's an upstream bug and should be fixed there. |
|
Current opened tickets about miniupnp: |
But if it works, we have a new issue. With the comment in place of the regular expressions. Correct? |
|
--- a/net/miniupnpd/files/miniupnpd.init
+++ b/net/miniupnpd/files/miniupnpd.init
@@ -39,7 +39,8 @@ conf_rule_add() {
# Make a single IP IP/32 so that miniupnpd.conf can use it.
[ "${int_addr%/*}" = "$int_addr" ] && int_addr="$int_addr/32"
- echo "$action $ext_start${ext_end:+-}$ext_end $int_addr $int_start${int_end:+-}$int_end #$comment"
+ echo "#$comment"
+ echo "$action $ext_start${ext_end:+-}$ext_end $int_addr $int_start${int_end:+-}$int_end"
}
upnpd_write_bool() { |
|
Since you are suggesting an upstream fix, why not just ignore the regular expression if the fifth token starts with a |
|
Making '#' an exception introduces inconsistency. What if more features are add later? Alternatively if separating comments is not feasible (which I could't get the point here), simply provide an empty token here ("" or '') will work. |
Considering that the daemon is more than two decades old and the ACL entries have not changed, I don't think this will happen. Even when using With the current package PR in preparation, there are even more ACL comments where adding an extra line would bloat the file. If you would agree to the suggestion, I could rework the daemon config generation so that if the ACL comment starts with a |
|
Ok, let's make '#' a terminator. But I don't think embed reg filter, or anything meaningful into ACL comment is a good idea. Eventually it should get its own option someday. |
Cool, thanks.
I've reconsidered. I have created a separate UCI (and LuCI UI) option, for this (Description filter Thanks for your downstream PR. If I understand your PR correctly, this will then be accepted: |
UPnP rules now may have an optional regex filter on requester's descriptions. This is a countermeasure against some UPnP exploiters without shutting down UPnP service completely, albeit they can bypass it by reporting innocent's descriptions maliciously.
Since the filter specifier is optional, existing valid config files will still work.
This increases the executable's size by 1.3 kB from original 147.7 kB on i386.
Maintainer:
Compile tested: i386 snapshot
Run tested: i386 snapshot