Skip to content

Commit

Permalink
Merge branch 'master' into 5720-wildcard-ignored-domains
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Sep 5, 2023
2 parents 9542ee1 + 1e45178 commit 1644d99
Show file tree
Hide file tree
Showing 116 changed files with 6,496 additions and 2,127 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ In this release, the schema version has changed from 24 to 27.

### Fixed

- Incorrect display date on statistics graph ([#5793]).
- Missing query log entries and statistics on service restart ([#6100]).
- Occasional DNS-over-QUIC and DNS-over-HTTP/3 errors ([#6133]).
- Legacy DNS rewrites containing IPv4-mapped IPv6 addresses are now matching the
Expand All @@ -162,6 +163,7 @@ In this release, the schema version has changed from 24 to 27.
[#2998]: https://github.com/AdguardTeam/AdGuardHome/issues/2998
[#3701]: https://github.com/AdguardTeam/AdGuardHome/issues/3701
[#5720]: https://github.com/AdguardTeam/AdGuardHome/issues/5720
[#5793]: https://github.com/AdguardTeam/AdGuardHome/issues/5793
[#5948]: https://github.com/AdguardTeam/AdGuardHome/issues/5948
[#6020]: https://github.com/AdguardTeam/AdGuardHome/issues/6020
[#6050]: https://github.com/AdguardTeam/AdGuardHome/issues/6050
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ui/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Line = ({
enableGridY={false}
enablePoints={false}
xFormat={(x) => {
if (interval === 1 || interval === 7) {
if (interval >= 0 && interval <= 7) {
const hoursAgo = subHours(Date.now(), 24 * interval);
return dateFormat(addHours(hoursAgo, x), 'D MMM HH:00');
}
Expand Down
4 changes: 2 additions & 2 deletions internal/arpdb/arpdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func (n Neighbor) Clone() (clone Neighbor) {
}
}

// validatedHostname returns valid hostname. Otherwise returns empty string and
// logs the error if hostname is not valid.
// validatedHostname returns h if it's a valid hostname, or an empty string
// otherwise, logging the validation error.
func validatedHostname(h string) (host string) {
err := netutil.ValidateHostname(h)
if err != nil {
Expand Down
49 changes: 49 additions & 0 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,52 @@
//
// TODO(a.garipov): Expand.
package client

import (
"encoding"
"fmt"
)

// Source represents the source from which the information about the client has
// been obtained.
type Source uint8

// Clients information sources. The order determines the priority.
const (
SourceNone Source = iota
SourceWHOIS
SourceARP
SourceRDNS
SourceDHCP
SourceHostsFile
SourcePersistent
)

// type check
var _ fmt.Stringer = Source(0)

// String returns a human-readable name of cs.
func (cs Source) String() (s string) {
switch cs {
case SourceWHOIS:
return "WHOIS"
case SourceARP:
return "ARP"
case SourceRDNS:
return "rDNS"
case SourceDHCP:
return "DHCP"
case SourceHostsFile:
return "etc/hosts"
default:
return ""
}
}

// type check
var _ encoding.TextMarshaler = Source(0)

// MarshalText implements encoding.TextMarshaler for the Source.
func (cs Source) MarshalText() (text []byte, err error) {
return []byte(cs.String()), nil
}
144 changes: 0 additions & 144 deletions internal/confmigrate/confmigrate.go

This file was deleted.

Loading

0 comments on commit 1644d99

Please sign in to comment.