Commit 7cc4dd0
committed
luci-app-upnp: update ACL options, migrate section
- Ignorable and cloneable ACL entries, always translated `Action`
- Improve UI with direct editability, clearer help wording, and rename
to `Access Control List`
- Note that the ACL is now rejected by default, with no preset and
accepted extra ports. Add (ignored) ACL template entries on migration
- Migrate ACL entries to the new section name `acl_entry`
- The following ACL UCI options been added or changed, and the previous
options are migrated on updating:
acl_entry UCI options | Change | Previous name
----------------------------|----------------------------|--------------
action | New/updated values (1) |
int_port | Remove colon separator (2) | int_ports
ext_port | Remove colon separator (2) | ext_ports
descr_filter | New option (3) |
1. Allow ignore, and update action option to use the nftables terms
(allow/deny -> accept/reject). To avoid adding inverted actions when
changing via LuCI, ensure any missing are set, as LuCI and UCI had
not matching action defaults. Missing actions are now ignored/logged
2. Ensure that the hyphen (-) is only used as a port range separator by
migration, as the colon (:) is not valid in LuCI
3. Add missing UCI option to set a regular expression to check for a
UPnP IGD IPv4 port map description, and fix the current collision
with the comment field which was not noticed due to a daemon bug
https://redirect.github.com/openwrt/packages/pull/24495
https://redirect.github.com/miniupnp/miniupnp/pull/853
- Refactoring by adding a more universal usable `is_port_or_range`
function instead of `upnpd_get_port_range` and check if it has a valid
range, and removes a shellcheck warning
- Rename `conf_rule_add` function to `upnpd_add_acl_entry`
(to merge with prior)
Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>1 parent febd0b9 commit 7cc4dd0
File tree
1 file changed
+28
-10
lines changed- applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp
1 file changed
+28
-10
lines changedLines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
| 345 | + | |
344 | 346 | | |
| 347 | + | |
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
| |||
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
355 | | - | |
| 358 | + | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
359 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
360 | 366 | | |
361 | | - | |
| 367 | + | |
362 | 368 | | |
363 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
364 | 372 | | |
365 | | - | |
| 373 | + | |
366 | 374 | | |
367 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
368 | 383 | | |
369 | 384 | | |
370 | | - | |
371 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
372 | 390 | | |
373 | 391 | | |
374 | 392 | | |
| |||
0 commit comments