Pull request 2074: 6420-ipset-imp-validation

Closes #6420.

Squashed commit of the following:

commit 5494df6681a3292a770b4faf7be8a88b9d860758
Merge: 5e2ab6c49 db42254d7
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Nov 21 16:13:15 2023 +0300

    Merge branch 'master' into 6420-ipset-imp-validation

commit 5e2ab6c4981f13e3c4ea7c9340f559e8e87bf95d
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Nov 20 20:45:11 2023 +0300

    ipset: imp err msg

commit 2696372491270ff85925d63d866f8db0656e816b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 17 13:59:33 2023 +0300

    all: imp docs

commit 0cb0e3582844897b18ec912e17079c33e7d1004c
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 16 18:20:35 2023 +0300

    all: upd chlog

commit 969f84a7c75cc2a8f44f5350f799b9a60bc546b3
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Nov 15 20:11:16 2023 +0300

    ipset: add type name
This commit is contained in:
Stanislav Chzhen 2023-11-21 16:22:04 +03:00
parent db42254d76
commit 0f5e8ca56f
2 changed files with 6 additions and 0 deletions

View File

@ -36,12 +36,14 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Fixed ### Fixed
- `ipset` entries family validation ([#6420]).
- Pre-filling the New static lease window with data ([#6402]). - Pre-filling the New static lease window with data ([#6402]).
- Protection pause timer synchronization ([#5759]). - Protection pause timer synchronization ([#5759]).
[#5759]: https://github.com/AdguardTeam/AdGuardHome/issues/5759 [#5759]: https://github.com/AdguardTeam/AdGuardHome/issues/5759
[#6369]: https://github.com/AdguardTeam/AdGuardHome/issues/6369 [#6369]: https://github.com/AdguardTeam/AdGuardHome/issues/6369
[#6402]: https://github.com/AdguardTeam/AdGuardHome/issues/6402 [#6402]: https://github.com/AdguardTeam/AdGuardHome/issues/6402
[#6420]: https://github.com/AdguardTeam/AdGuardHome/issues/6420
<!-- <!--
NOTE: Add new changes ABOVE THIS COMMENT. NOTE: Add new changes ABOVE THIS COMMENT.

View File

@ -296,6 +296,10 @@ func (m *manager) ipsets(names []string) (sets []props, err error) {
return nil, fmt.Errorf("unknown ipset %q", n) return nil, fmt.Errorf("unknown ipset %q", n)
} }
if p.family != netfilter.ProtoIPv4 && p.family != netfilter.ProtoIPv6 {
return nil, fmt.Errorf("%q unexpected ipset family %q", p.name, p.family)
}
sets = append(sets, p) sets = append(sets, p)
} }