10 Commits

Author SHA1 Message Date
Rick Fletcher
ed05cffcd4 fix: update broken link to expr language definition (#7604)
Signed-off-by: Rick Fletcher <fletch@pobox.com>
2025-10-10 18:24:14 -07:00
Ville Vesilehto
a30954ea71 test(view): improve test coverage (#7543)
Cover edge cases in config parser. Add rudimentary View/Filter
tests. Improves test coverage from 44% to 82%.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2025-09-15 10:17:35 -07:00
Ville Vesilehto
c916cf4259 fix(plugin): nilness findings (#7556)
Enable nilness linter in govet.

Plugin-by-plugin rationale:

- plugin/transfer: reuse error instead of shadowing it inside the for
  loop by declaring "ret" outside of the loop
- plugin/view: remove redundant err check
- plugin/dnstap: avoid possible nil dereference in error reporting
  path in setup test
- plugin/forward: prevent nil deference or empty-slice dereference on
  error paths in setup test

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2025-09-15 10:17:06 -07:00
Ben Kochie
83afff1fec view: Add IPv6 example match (#7355)
Add an IPv6 source address matching example to the view plugin.

Fixes: https://github.com/coredns/coredns/issues/7354

Signed-off-by: SuperQ <superq@gmail.com>
2025-06-05 18:20:24 +02:00
Kevin Lyda
c742ec03f5 Upgrade antonmedv/expr to expr-lang/expr (#6814)
* Upgrade antonmedv/expr to expr-lang/expr

The project has moved.  This also upgrades from 1.15.5 to 1.16.9.
The expr project lacks a changelog but tests pass and the changes don't
seem to change it much - but there were a lot of changes.

Signed-off-by: Kevin Lyda <kevin@lyda.ie>

* Upgrade build image

In reviewing the build results I see the old build image was deprecated so
upgrading to something newer.

Signed-off-by: Kevin Lyda <kevin@lyda.ie>

---------

Signed-off-by: Kevin Lyda <kevin@lyda.ie>
2024-08-11 08:00:49 -04:00
Nakano Masaki
62b23aeae6 fix broken link in webpage (#6488)
Signed-off-by: Masaki Nakano <admin@namachan10777.dev>
2024-03-07 14:24:38 -05:00
Keita Kitamura
945db2facd Fix typo in view plugin README.md (#6457)
Signed-off-by: keita <keitap@gmail.com>
2024-01-09 12:38:17 -05:00
Yong Tang
430e3ad986 Update expr from 1.13.0 to 1.15.3 (#6375)
Manually update expr to resolve test failures

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2023-10-27 22:44:11 +02:00
Ondřej Benkovský
d436deb93b plugin/view : fix README (#5627)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-09-17 09:59:47 -04:00
Chris O'Haver
b56b080a7c plugin/view: Advanced routing interface and new 'view' plugin (#5538)
* introduce new interface "dnsserver.Viewer", that allows a plugin implementing it to decide if a query should be routed into its server block.
* add new plugin "view", that uses the new interface to enable a user to define expression based conditions that must be met for a query to be routed to its server block.

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-09-08 14:56:27 -04:00