docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
"dev": true | <mask> },
<mask> "safe-buffer": {
<mask> "version": "5.1.2",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "optional": true
<mask> },
<mask> "safer-buffer": {
<mask> "version": "2.1.2",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json |
<mask> "string-width": {
<mask> "version": "1.0.2",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "optional": true,
<mask> "requires": {
<mask> "code-point-at": "^1.0.0",
<mask> "is-fullwidth-code-point": "^1.0.0",
<mask> "strip-ansi": "^3.0.0"
<mask> }
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json | |
<mask> "strip-ansi": {
<mask> "version": "3.0.1",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "optional": true,
<mask> "requires": {
<mask> "ansi-regex": "^2.0.0"
<mask> }
<mask> },
<mask> "strip-json-comments": {
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json | |
"dev": true | <mask> },
<mask> "wrappy": {
<mask> "version": "1.0.2",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "optional": true
<mask> },
<mask> "yallist": {
<mask> "version": "3.0.3",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json |
"dev": true | <mask> },
<mask> "yallist": {
<mask> "version": "3.0.3",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "optional": true
<mask> }
<mask> }
<mask> },
<mask> "function-bind": {
<mask> "version": "1.1.1",
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json |
"react-side-effect": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.2.0.tgz",
"integrity": "sha512-v1ht1aHg5k/thv56DRcjw+WtojuuDHFUgGfc+bFHOWsF4ZK6C2V57DO0Or0GPsg6+LSTE0M6Ry/gfzhzSwbc5w==",
"requires": {
"shallowequal": "^1.0.1"
}
}, | <mask> "prop-types": "^15.6.0"
<mask> }
<mask> },
<mask> "react-table": {
<mask> "version": "6.10.3",
<mask> "resolved": "https://registry.npmjs.org/react-table/-/react-table-6.10.3.tgz",
<mask> "integrity": "sha512-sVlq2/rxVaQJywGD95+qGiMr/SMHFIFnXdx619BLOWE/Os5FOGtV6pQJNAjZixbQZiOu7dmBO1kME28uxh6wmA==",
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json |
"shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
}, | <mask> "safe-buffer": "^5.0.1"
<mask> }
<mask> },
<mask> "shebang-command": {
<mask> "version": "1.2.0",
<mask> "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
<mask> "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package-lock.json |
"react-helmet": "^5.2.1", | <mask> "react-click-outside": "^3.0.1",
<mask> "react-dom": "^16.4.0",
<mask> "react-i18next": "^8.2.0",
<mask> "react-modal": "^3.4.5",
<mask> "react-redux": "^5.0.7",
<mask> "react-redux-loading-bar": "^4.0.7",
<mask> "react-router-dom": "^4.2.2",
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/package.json |
import { Helmet } from 'react-helmet'; | <mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import { HashLink as Link } from 'react-router-hash-link';
<mask>
<mask> import {
<mask> formatTime,
<mask> formatDateTime,
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add </s> remove "optional": true,
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/src/components/Logs/index.js |
<Helmet>
<meta httpEquiv="x-dns-prefetch-control" content="off" />
</Helmet> | <mask> );
<mask>
<mask> return (
<mask> <Fragment>
<mask> <PageTitle title={t('query_log')}>{refreshButton}</PageTitle>
<mask> {enabled && processingGetConfig && <Loading />}
<mask> {enabled && !processingGetConfig && (
<mask> <Fragment>
<mask> <Filters
<mask> filter={queryLogs.filter}
</s> + client: add X-DNS-Prefetch-Control meta tag </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "optional": true,
</s> add </s> remove "dev": true,
"optional": true
</s> add "dev": true </s> remove "dev": true,
"optional": true
</s> add "dev": true | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf410c81ae30e2ac0a9064cd8e890449e29d34db | client/src/components/Logs/index.js |
setDNSServers(&w, r, true)
}
func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
setDNSServers(&w, r, false)
}
// setDNSServers sets upstream and bootstrap DNS servers
func setDNSServers(w *http.ResponseWriter, r *http.Request, upstreams bool) { | <mask> // -----------------------
<mask>
<mask> func handleSetUpstreamDNS(w http.ResponseWriter, r *http.Request) {
<mask> body, err := ioutil.ReadAll(r.Body)
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Failed to read request body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(*w, errorText, http.StatusBadRequest)
<mask> return
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusBadRequest)
</s> add http.Error(*w, errorText, http.StatusBadRequest) </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
http.Error(*w, errorText, http.StatusBadRequest) | <mask> body, err := ioutil.ReadAll(r.Body)
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Failed to read request body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusBadRequest)
<mask> return
<mask> }
<mask> // if empty body -- user is asking for default servers
<mask> hosts := strings.Fields(string(body))
<mask>
</s> Refactoring for set upstream and bootstrap DNS </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove if len(hosts) == 0 {
config.DNS.UpstreamDNS = defaultDNS
</s> add // bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice
bootstraps := []string{}
if !upstreams && len(hosts) > 0 {
for _, host := range hosts {
err = checkBootstrapDNS(host)
if err != nil {
log.Tracef("%s can not be used as bootstrap DNS cause: %s", host, err)
continue
}
hosts = append(bootstraps, host)
}
}
// count of upstream or bootstrap servers
var count int
if upstreams {
count = len(hosts)
} else {
count = len(bootstraps)
}
if upstreams {
if count == 0 {
config.DNS.UpstreamDNS = defaultDNS
} else {
config.DNS.UpstreamDNS = hosts
} </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
// bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice
bootstraps := []string{}
if !upstreams && len(hosts) > 0 {
for _, host := range hosts {
err = checkBootstrapDNS(host)
if err != nil {
log.Tracef("%s can not be used as bootstrap DNS cause: %s", host, err)
continue
}
hosts = append(bootstraps, host)
}
}
// count of upstream or bootstrap servers
var count int
if upstreams {
count = len(hosts)
} else {
count = len(bootstraps)
}
if upstreams {
if count == 0 {
config.DNS.UpstreamDNS = defaultDNS
} else {
config.DNS.UpstreamDNS = hosts
} | <mask> }
<mask> // if empty body -- user is asking for default servers
<mask> hosts := strings.Fields(string(body))
<mask>
<mask> if len(hosts) == 0 {
<mask> config.DNS.UpstreamDNS = defaultDNS
<mask> } else {
<mask> config.DNS.UpstreamDNS = hosts
<mask> }
<mask>
<mask> err = writeAllConfigs()
</s> Refactoring for set upstream and bootstrap DNS </s> remove config.DNS.UpstreamDNS = hosts
</s> add if count == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = bootstraps
} </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove http.Error(w, errorText, http.StatusBadRequest)
</s> add http.Error(*w, errorText, http.StatusBadRequest) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
if count == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = bootstraps
} | <mask>
<mask> if len(hosts) == 0 {
<mask> config.DNS.UpstreamDNS = defaultDNS
<mask> } else {
<mask> config.DNS.UpstreamDNS = hosts
<mask> }
<mask>
<mask> err = writeAllConfigs()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write config file: %s", err)
</s> Refactoring for set upstream and bootstrap DNS </s> remove if len(hosts) == 0 {
config.DNS.UpstreamDNS = defaultDNS
</s> add // bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice
bootstraps := []string{}
if !upstreams && len(hosts) > 0 {
for _, host := range hosts {
err = checkBootstrapDNS(host)
if err != nil {
log.Tracef("%s can not be used as bootstrap DNS cause: %s", host, err)
continue
}
hosts = append(bootstraps, host)
}
}
// count of upstream or bootstrap servers
var count int
if upstreams {
count = len(hosts)
} else {
count = len(bootstraps)
}
if upstreams {
if count == 0 {
config.DNS.UpstreamDNS = defaultDNS
} else {
config.DNS.UpstreamDNS = hosts
} </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
http.Error(*w, errorText, http.StatusInternalServerError) | <mask> err = writeAllConfigs()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write config file: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> return
<mask> }
<mask> err = reconfigureDNSServer()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove config.DNS.UpstreamDNS = hosts
</s> add if count == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = bootstraps
} </s> remove _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
</s> add _, err = fmt.Fprintf(*w, "OK %d servers\n", count) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
http.Error(*w, errorText, http.StatusInternalServerError) | <mask> err = reconfigureDNSServer()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> return
<mask> }
<mask> _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write body: %s", err)
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
</s> add _, err = fmt.Fprintf(*w, "OK %d servers\n", count) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil </s> remove config.DNS.UpstreamDNS = hosts
</s> add if count == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = bootstraps
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
_, err = fmt.Fprintf(*w, "OK %d servers\n", count) | <mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> return
<mask> }
<mask> _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> }
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusBadRequest)
</s> add http.Error(*w, errorText, http.StatusBadRequest) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil | <mask> _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> }
<mask> }
<mask>
<mask> func handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
<mask> body, err := ioutil.ReadAll(r.Body)
</s> Refactoring for set upstream and bootstrap DNS </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove _, err = fmt.Fprintf(w, "OK %d servers\n", len(hosts))
</s> add _, err = fmt.Fprintf(*w, "OK %d servers\n", count) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
// Check if host is ip with port
_, _, err := net.SplitHostPort(host)
return err | <mask> return nil
<mask> }
<mask> }
<mask>
<mask> func handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
<mask> body, err := ioutil.ReadAll(r.Body)
<mask> if err != nil {
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil </s> remove func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
if err != nil {
errorText := fmt.Sprintf("Failed to read request body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusBadRequest)
return
}
// if empty body -- user is asking for default servers
hosts := strings.Fields(string(body))
if len(hosts) == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = hosts
}
err = writeAllConfigs()
if err != nil {
errorText := fmt.Sprintf("Couldn't write config file: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
err = reconfigureDNSServer()
if err != nil {
errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
return
}
_, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
if err != nil {
errorText := fmt.Sprintf("Couldn't write body: %s", err)
log.Println(errorText)
http.Error(w, errorText, http.StatusInternalServerError)
}
}
</s> add </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go |
<mask> log.Printf("DNS %s works OK", input)
<mask> return nil
<mask> }
<mask>
<mask> func handleSetBootstrapDNS(w http.ResponseWriter, r *http.Request) {
<mask> body, err := ioutil.ReadAll(r.Body)
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Failed to read request body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusBadRequest)
<mask> return
<mask> }
<mask> // if empty body -- user is asking for default servers
<mask> hosts := strings.Fields(string(body))
<mask>
<mask> if len(hosts) == 0 {
<mask> config.DNS.BootstrapDNS = defaultBootstrap
<mask> } else {
<mask> config.DNS.BootstrapDNS = hosts
<mask> }
<mask>
<mask> err = writeAllConfigs()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write config file: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> return
<mask> }
<mask> err = reconfigureDNSServer()
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't reconfigure the DNS server: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> return
<mask> }
<mask> _, err = fmt.Fprintf(w, "OK %d bootsrap servers\n", len(hosts))
<mask> if err != nil {
<mask> errorText := fmt.Sprintf("Couldn't write body: %s", err)
<mask> log.Println(errorText)
<mask> http.Error(w, errorText, http.StatusInternalServerError)
<mask> }
<mask> }
<mask>
<mask> func handleGetVersionJSON(w http.ResponseWriter, r *http.Request) {
<mask> now := time.Now()
<mask> if now.Sub(versionCheckLastTime) <= versionCheckPeriod && len(versionCheckJSON) != 0 {
<mask> // return cached copy
<mask> w.Header().Set("Content-Type", "application/json")
</s> Refactoring for set upstream and bootstrap DNS </s> remove http.Error(w, errorText, http.StatusBadRequest)
</s> add http.Error(*w, errorText, http.StatusBadRequest) </s> remove config.DNS.UpstreamDNS = hosts
</s> add if count == 0 {
config.DNS.BootstrapDNS = defaultBootstrap
} else {
config.DNS.BootstrapDNS = bootstraps
} </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError) </s> remove http.Error(w, errorText, http.StatusInternalServerError)
</s> add http.Error(*w, errorText, http.StatusInternalServerError)
}
}
func checkBootstrapDNS(host string) error {
// Check if host is ip without port
if net.ParseIP(host) != nil {
return nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/bf893d488afbb306e341f5bcc8e651053d92de97 | control.go | |
MANUAL_UPDATE_LINK, | <mask> CHECK_TIMEOUT,
<mask> STATUS_RESPONSE,
<mask> SETTINGS_NAMES,
<mask> FORM_NAME,
<mask> GETTING_STARTED_LINK,
<mask> } from '../helpers/constants';
<mask> import { areEqualVersions } from '../helpers/version';
<mask> import { getTlsStatus } from './encryption';
<mask> import apiClient from '../api/Api';
<mask> import { addErrorToast, addNoticeToast, addSuccessToast } from './toasts';
</s> Pull request: client: upd manual upd link
Closes #4208.
Squashed commit of the following:
commit 4ae27b5f7cd6b0f4ec0c9041d92c4d1ac00dd622
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Jan 31 18:34:18 2022 +0300
client: upd manual upd link </s> remove a: <a href={GETTING_STARTED_LINK} target="_blank"
</s> add a: <a href={MANUAL_UPDATE_LINK} target="_blank" </s> remove export const GETTING_STARTED_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Getting-Started#update';
</s> add export const MANUAL_UPDATE_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#manual-update'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf9b35b9c6a29b3c3f6535a8db993b879ab94d37 | client/src/actions/index.js |
a: <a href={MANUAL_UPDATE_LINK} target="_blank" | <mask> dispatch(getUpdateRequest());
<mask> const handleRequestError = () => {
<mask> const options = {
<mask> components: {
<mask> a: <a href={GETTING_STARTED_LINK} target="_blank"
<mask> rel="noopener noreferrer" />,
<mask> },
<mask> };
<mask>
<mask> dispatch(addNoticeToast({ error: 'update_failed', options }));
</s> Pull request: client: upd manual upd link
Closes #4208.
Squashed commit of the following:
commit 4ae27b5f7cd6b0f4ec0c9041d92c4d1ac00dd622
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Jan 31 18:34:18 2022 +0300
client: upd manual upd link </s> remove export const GETTING_STARTED_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Getting-Started#update';
</s> add export const MANUAL_UPDATE_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#manual-update'; </s> remove GETTING_STARTED_LINK,
</s> add MANUAL_UPDATE_LINK, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf9b35b9c6a29b3c3f6535a8db993b879ab94d37 | client/src/actions/index.js |
export const MANUAL_UPDATE_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#manual-update'; | <mask>
<mask> export const PRIVACY_POLICY_LINK = 'https://adguard.com/privacy/home.html';
<mask> export const PORT_53_FAQ_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#bindinuse';
<mask> export const UPSTREAM_CONFIGURATION_WIKI_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams';
<mask> export const GETTING_STARTED_LINK = 'https://github.com/AdguardTeam/AdGuardHome/wiki/Getting-Started#update';
<mask>
<mask> export const FILTERS_RELATIVE_LINK = '#filters';
<mask>
<mask> export const ADDRESS_IN_USE_TEXT = 'address already in use';
<mask>
</s> Pull request: client: upd manual upd link
Closes #4208.
Squashed commit of the following:
commit 4ae27b5f7cd6b0f4ec0c9041d92c4d1ac00dd622
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Jan 31 18:34:18 2022 +0300
client: upd manual upd link </s> remove a: <a href={GETTING_STARTED_LINK} target="_blank"
</s> add a: <a href={MANUAL_UPDATE_LINK} target="_blank" </s> remove GETTING_STARTED_LINK,
</s> add MANUAL_UPDATE_LINK, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bf9b35b9c6a29b3c3f6535a8db993b879ab94d37 | client/src/helpers/constants.js |
reqIP := req.RequestedIPAddress()
if len(reqIP) != 0 && !reqIP.Equal(lease.IP) { | <mask>
<mask> s.conf.notify(LeaseChangedDBStore)
<mask>
<mask> } else {
<mask> reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
<mask> if len(reqIP) != 0 &&
<mask> !bytes.Equal(reqIP, lease.IP) {
<mask> log.Debug("dhcpv4: different RequestedIP: %v != %v", reqIP, lease.IP)
<mask> }
<mask> }
<mask>
<mask> resp.UpdateOption(dhcpv4.OptMessageType(dhcpv4.MessageTypeOffer))
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove lease.Hostname = string(hostname)
</s> add lease.Hostname = req.HostName() </s> remove hostname := req.Options.Get(dhcpv4.OptionHostName)
reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
</s> add reqIP := req.RequestedIPAddress() </s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
reqIP := req.RequestedIPAddress() | <mask> // Return false if we don't need to reply
<mask> func (s *v4Server) processRequest(req, resp *dhcpv4.DHCPv4) (*Lease, bool) {
<mask> var lease *Lease
<mask> mac := req.ClientHWAddr
<mask> hostname := req.Options.Get(dhcpv4.OptionHostName)
<mask> reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
<mask> if reqIP == nil {
<mask> reqIP = req.ClientIPAddr
<mask> }
<mask>
<mask> sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
if len(reqIP) != 0 &&
!bytes.Equal(reqIP, lease.IP) {
</s> add reqIP := req.RequestedIPAddress()
if len(reqIP) != 0 && !reqIP.Equal(lease.IP) { </s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove lease.Hostname = string(hostname)
</s> add lease.Hostname = req.HostName() </s> remove log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
</s> add log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
| <mask> if reqIP == nil {
<mask> reqIP = req.ClientIPAddr
<mask> }
<mask>
<mask> sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
<mask> if len(sid) != 0 &&
<mask> !bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
<mask> log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
<mask> return nil, false
<mask> }
<mask>
<mask> if len(reqIP) != 4 {
<mask> log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
if len(reqIP) != 0 &&
!bytes.Equal(reqIP, lease.IP) {
</s> add reqIP := req.RequestedIPAddress()
if len(reqIP) != 0 && !reqIP.Equal(lease.IP) { </s> remove hostname := req.Options.Get(dhcpv4.OptionHostName)
reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
</s> add reqIP := req.RequestedIPAddress() </s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
</s> remove log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
</s> add log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
| <mask> log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
<mask> return nil, false
<mask> }
<mask>
<mask> if len(reqIP) != 4 {
<mask> log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
<mask> return nil, false
<mask> }
<mask>
<mask> s.leasesLock.Lock()
<mask> for _, l := range s.leases {
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove if !bytes.Equal(l.IP, reqIP) {
</s> add if !l.IP.Equal(reqIP) { </s> remove log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
</s> add log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
</s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
</s> remove reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
if len(reqIP) != 0 &&
!bytes.Equal(reqIP, lease.IP) {
</s> add reqIP := req.RequestedIPAddress()
if len(reqIP) != 0 && !reqIP.Equal(lease.IP) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
if !l.IP.Equal(reqIP) { | <mask>
<mask> s.leasesLock.Lock()
<mask> for _, l := range s.leases {
<mask> if bytes.Equal(l.HWAddr, mac) {
<mask> if !bytes.Equal(l.IP, reqIP) {
<mask> s.leasesLock.Unlock()
<mask> log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
<mask> return nil, true
<mask> }
<mask>
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
</s> add log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
</s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
</s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove lease.Hostname = string(hostname)
</s> add lease.Hostname = req.HostName() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
| <mask> for _, l := range s.leases {
<mask> if bytes.Equal(l.HWAddr, mac) {
<mask> if !bytes.Equal(l.IP, reqIP) {
<mask> s.leasesLock.Unlock()
<mask> log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
<mask> return nil, true
<mask> }
<mask>
<mask> lease = l
<mask> break
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove if !bytes.Equal(l.IP, reqIP) {
</s> add if !l.IP.Equal(reqIP) { </s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
</s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove lease.Hostname = string(hostname)
</s> add lease.Hostname = req.HostName() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
log.Debug("dhcpv4: no lease for %s", mac)
| <mask> }
<mask> s.leasesLock.Unlock()
<mask>
<mask> if lease == nil {
<mask> log.Debug("dhcpv4: No lease for %s", mac)
<mask> return nil, true
<mask> }
<mask>
<mask> if lease.Expiry.Unix() != leaseExpireStatic {
<mask> lease.Hostname = string(hostname)
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove lease.Hostname = string(hostname)
</s> add lease.Hostname = req.HostName() </s> remove log.Debug("dhcpv4: Mismatched OptionRequestedIPAddress in Request message for %s", mac)
</s> add log.Debug("dhcpv4: mismatched OptionRequestedIPAddress in request message for %s", mac)
</s> remove if !bytes.Equal(l.IP, reqIP) {
</s> add if !l.IP.Equal(reqIP) { </s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
lease.Hostname = req.HostName() | <mask> return nil, true
<mask> }
<mask>
<mask> if lease.Expiry.Unix() != leaseExpireStatic {
<mask> lease.Hostname = string(hostname)
<mask> s.commitLease(lease)
<mask> } else if len(lease.Hostname) != 0 {
<mask> o := &optFQDN{
<mask> name: lease.Hostname,
<mask> }
</s> Pull request: dhcpd: actually use hostname method
Updates #2582.
Squashed commit of the following:
commit 456bbafa5a7e84e30d5a5c0ee58f5bacebb2b003
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:23:32 2021 +0300
dhcpd: imp more
commit 69258ed0d36e59f6be3c31250ea6fd37a1e4cb53
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Mar 12 13:01:18 2021 +0300
dhcpd: actually use hostname method </s> remove log.Debug("dhcpv4: No lease for %s", mac)
</s> add log.Debug("dhcpv4: no lease for %s", mac)
</s> remove reqIP := req.Options.Get(dhcpv4.OptionRequestedIPAddress)
if len(reqIP) != 0 &&
!bytes.Equal(reqIP, lease.IP) {
</s> add reqIP := req.RequestedIPAddress()
if len(reqIP) != 0 && !reqIP.Equal(lease.IP) { </s> remove sid := req.Options.Get(dhcpv4.OptionServerIdentifier)
if len(sid) != 0 &&
!bytes.Equal(sid, s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: Bad OptionServerIdentifier in Request message for %s", mac)
</s> add sid := req.ServerIdentifier()
if len(sid) != 0 && !sid.Equal(s.conf.dnsIPAddrs[0]) {
log.Debug("dhcpv4: bad OptionServerIdentifier in request message for %s", mac)
</s> remove if len(reqIP) != 4 {
log.Debug("dhcpv4: Bad OptionRequestedIPAddress in Request message for %s", mac)
</s> add if ip4 := reqIP.To4(); ip4 == nil {
log.Debug("dhcpv4: bad OptionRequestedIPAddress in request message for %s", mac)
</s> remove if !bytes.Equal(l.IP, reqIP) {
</s> add if !l.IP.Equal(reqIP) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfbf73f3cddabed252fe1efe061de1f441f0b5b4 | internal/dhcpd/v4.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" | <mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "golang.org/x/net/icmp"
<mask> "golang.org/x/net/ipv6"
<mask> )
<mask>
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove func TestRA(t *testing.T) {
data := createICMPv6RAPacket(icmpv6RA{
</s> add func TestCreateICMPv6RAPacket(t *testing.T) {
wantData := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10,
0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc,
0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00,
0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00,
0x00, 0x00,
}
gotData, err := createICMPv6RAPacket(icmpv6RA{ </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // Link-Layer Address[6]
</s> add // Link-Layer Address[8/24] | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
// Link-Layer Address[8/24] | <mask> // Length * 8bytes[1]
<mask> // Reserved[2]
<mask> // MTU[4]
<mask> // Option=Source link-layer address(1):
<mask> // Link-Layer Address[6]
<mask> // Option=Recursive DNS Server(25):
<mask> // Type[1]
<mask> // Length * 8bytes[1]
<mask> // Reserved[2]
<mask> // Lifetime[4]
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove copy(data[i:], params.sourceLinkLayerAddress) // Link-Layer Address[6]
i += 6
</s> add copy(data[i:], lla) // Link-Layer Address[8/24]
i += len(lla) </s> remove func createICMPv6RAPacket(params icmpv6RA) []byte {
data := make([]byte, 88)
</s> add func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) </s> remove return data
</s> add return data, nil </s> remove log.Debug("DHCPv6: srv.Serve: %s", err)
</s> add log.Error("dhcpv6: srv.Serve: %s", err) </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) | <mask> // Length * 8bytes[1]
<mask> // Reserved[2]
<mask> // Lifetime[4]
<mask> // Addresses of IPv6 Recursive DNS Servers[16]
<mask> func createICMPv6RAPacket(params icmpv6RA) []byte {
<mask> data := make([]byte, 88)
<mask> i := 0
<mask>
<mask> // ICMPv6:
<mask>
<mask> data[i] = 134 // type
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove return data
</s> add return data, nil </s> remove // Link-Layer Address[6]
</s> add // Link-Layer Address[8/24] </s> remove copy(data[i:], params.sourceLinkLayerAddress) // Link-Layer Address[6]
i += 6
</s> add copy(data[i:], lla) // Link-Layer Address[8/24]
i += len(lla) </s> remove data := createICMPv6RAPacket(params)
</s> add var data []byte
data, err = createICMPv6RAPacket(params)
if err != nil {
return fmt.Errorf("creating packet: %w", err)
} </s> remove l := Lease{}
l.HWAddr = make([]byte, 6)
</s> add l := Lease{
HWAddr: make([]byte, len(mac)),
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
copy(data[i:], lla) // Link-Layer Address[8/24]
i += len(lla) | <mask>
<mask> data[i] = 1 // Type
<mask> data[i+1] = 1 // Length
<mask> i += 2
<mask> copy(data[i:], params.sourceLinkLayerAddress) // Link-Layer Address[6]
<mask> i += 6
<mask>
<mask> // Option=Recursive DNS Server:
<mask>
<mask> data[i] = 25 // Type
<mask> data[i+1] = 3 // Length
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // Link-Layer Address[6]
</s> add // Link-Layer Address[8/24] </s> remove return data
</s> add return data, nil </s> remove func createICMPv6RAPacket(params icmpv6RA) []byte {
data := make([]byte, 88)
</s> add func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
return data, nil | <mask> binary.BigEndian.PutUint32(data[i:], 3600) // Lifetime[4]
<mask> i += 4
<mask> copy(data[i:], params.recursiveDNSServer) // Addresses of IPv6 Recursive DNS Servers[16]
<mask>
<mask> return data
<mask> }
<mask>
<mask> // Init - initialize RA module
<mask> func (ra *raCtx) Init() error {
<mask> ra.stop.Store(0)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove func (ra *raCtx) Init() error {
</s> add func (ra *raCtx) Init() (err error) { </s> remove func createICMPv6RAPacket(params icmpv6RA) []byte {
data := make([]byte, 88)
</s> add func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) </s> remove copy(data[i:], params.sourceLinkLayerAddress) // Link-Layer Address[6]
i += 6
</s> add copy(data[i:], lla) // Link-Layer Address[8/24]
i += len(lla) </s> remove func (s *v6Server) Start() error {
</s> add func (s *v6Server) Start() (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
func (ra *raCtx) Init() (err error) { | <mask> return data
<mask> }
<mask>
<mask> // Init - initialize RA module
<mask> func (ra *raCtx) Init() error {
<mask> ra.stop.Store(0)
<mask> ra.conn = nil
<mask> if !(ra.raAllowSLAAC || ra.raSLAACOnly) {
<mask> return nil
<mask> }
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove return data
</s> add return data, nil </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
var data []byte
data, err = createICMPv6RAPacket(params)
if err != nil {
return fmt.Errorf("creating packet: %w", err)
} | <mask> }
<mask> params.prefix = make([]byte, 16)
<mask> copy(params.prefix, ra.prefixIPAddr[:8]) // /64
<mask>
<mask> data := createICMPv6RAPacket(params)
<mask>
<mask> var err error
<mask> success := false
<mask> ipAndScope := ra.ipAddr.String() + "%" + ra.ifaceName
<mask> ra.conn, err = icmp.ListenPacket("ip6:ipv6-icmp", ipAndScope)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove var err error
</s> add </s> remove func createICMPv6RAPacket(params icmpv6RA) []byte {
data := make([]byte, 88)
</s> add func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) </s> remove l := Lease{}
l.HWAddr = make([]byte, 6)
</s> add l := Lease{
HWAddr: make([]byte, len(mac)),
}
</s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go |
<mask> copy(params.prefix, ra.prefixIPAddr[:8]) // /64
<mask>
<mask> data := createICMPv6RAPacket(params)
<mask>
<mask> var err error
<mask> success := false
<mask> ipAndScope := ra.ipAddr.String() + "%" + ra.ifaceName
<mask> ra.conn, err = icmp.ListenPacket("ip6:ipv6-icmp", ipAndScope)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6 ra: icmp.ListenPacket: %w", err)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove data := createICMPv6RAPacket(params)
</s> add var data []byte
data, err = createICMPv6RAPacket(params)
if err != nil {
return fmt.Errorf("creating packet: %w", err)
} </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv.go | |
func TestCreateICMPv6RAPacket(t *testing.T) {
wantData := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10,
0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc,
0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00,
0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00,
0x00, 0x00,
}
gotData, err := createICMPv6RAPacket(icmpv6RA{ | <mask>
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func TestRA(t *testing.T) {
<mask> data := createICMPv6RAPacket(icmpv6RA{
<mask> managedAddressConfiguration: false,
<mask> otherConfiguration: true,
<mask> mtu: 1500,
<mask> prefix: net.ParseIP("1234::"),
<mask> prefixLen: 64,
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove data := createICMPv6RAPacket(params)
</s> add var data []byte
data, err = createICMPv6RAPacket(params)
if err != nil {
return fmt.Errorf("creating packet: %w", err)
} </s> remove func createICMPv6RAPacket(params icmpv6RA) []byte {
data := make([]byte, 88)
</s> add func createICMPv6RAPacket(params icmpv6RA) (data []byte, err error) {
var lla []byte
lla, err = hwAddrToLinkLayerAddr(params.sourceLinkLayerAddress)
if err != nil {
return nil, fmt.Errorf("converting source link layer address: %w", err)
}
// TODO(a.garipov): Don't use a magic constant here. Refactor the code
// and make all constants named instead of all those comments..
data = make([]byte, 82+len(lla)) </s> remove var err error
</s> add </s> remove dataCorrect := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc, 0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x27, 0xff, 0xfe, 0x00, 0x00, 0x00,
}
assert.Equal(t, dataCorrect, data)
</s> add assert.NoError(t, err)
assert.Equal(t, wantData, gotData) </s> remove func (ra *raCtx) Init() error {
</s> add func (ra *raCtx) Init() (err error) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv_test.go |
assert.NoError(t, err)
assert.Equal(t, wantData, gotData) | <mask> prefixLen: 64,
<mask> recursiveDNSServer: net.ParseIP("fe80::800:27ff:fe00:0"),
<mask> sourceLinkLayerAddress: []byte{0x0a, 0x00, 0x27, 0x00, 0x00, 0x00},
<mask> })
<mask> dataCorrect := []byte{
<mask> 0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
<mask> 0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
<mask> 0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
<mask> 0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc, 0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
<mask> 0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
<mask> 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00, 0x00, 0x00,
<mask> }
<mask> assert.Equal(t, dataCorrect, data)
<mask> }
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove func TestRA(t *testing.T) {
data := createICMPv6RAPacket(icmpv6RA{
</s> add func TestCreateICMPv6RAPacket(t *testing.T) {
wantData := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10,
0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc,
0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00,
0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00,
0x00, 0x00,
}
gotData, err := createICMPv6RAPacket(icmpv6RA{ </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove l := Lease{}
l.HWAddr = make([]byte, 6)
</s> add l := Lease{
HWAddr: make([]byte, len(mac)),
}
</s> remove data := createICMPv6RAPacket(params)
</s> add var data []byte
data, err = createICMPv6RAPacket(params)
if err != nil {
return fmt.Errorf("creating packet: %w", err)
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/routeradv_test.go |
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" | <mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/go-ping/ping"
<mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> )
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove func TestRA(t *testing.T) {
data := createICMPv6RAPacket(icmpv6RA{
</s> add func TestCreateICMPv6RAPacket(t *testing.T) {
wantData := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10,
0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc,
0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00,
0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00,
0x00, 0x00,
}
gotData, err := createICMPv6RAPacket(icmpv6RA{ </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // Link-Layer Address[6]
</s> add // Link-Layer Address[8/24] | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | <mask> if ip4 := l.IP.To4(); ip4 == nil {
<mask> return fmt.Errorf("invalid ip %q, only ipv4 is supported", l.IP)
<mask> }
<mask>
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid mac %q, only EUI-48 is supported", l.HWAddr)
<mask> }
<mask>
<mask> l.Expiry = time.Unix(leaseExpireStatic, 0)
<mask>
<mask> // Perform the following actions in an anonymous function to make sure
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
// RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
| <mask>
<mask> return nil
<mask> }
<mask>
<mask> // RemoveStaticLease removes a static lease (thread-safe)
<mask> func (s *v4Server) RemoveStaticLease(l Lease) error {
<mask> if len(l.IP) != 4 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | <mask> func (s *v4Server) RemoveStaticLease(l Lease) error {
<mask> if len(l.IP) != 4 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
<mask> }
<mask>
<mask> s.leasesLock.Lock()
<mask> err := s.rmLease(l)
<mask> if err != nil {
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
err = s.rmLease(l) | <mask> return fmt.Errorf("invalid MAC")
<mask> }
<mask>
<mask> s.leasesLock.Lock()
<mask> err := s.rmLease(l)
<mask> if err != nil {
<mask> s.leasesLock.Unlock()
<mask>
<mask> return err
<mask> }
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
err = aghnet.ValidateHardwareAddress(req.ClientHWAddr)
if err != nil {
log.Error("dhcpv4: invalid ClientHWAddr: %s", err)
| <mask> log.Debug("dhcpv4: dhcpv4.New: %s", err)
<mask> return
<mask> }
<mask>
<mask> if len(req.ClientHWAddr) != 6 {
<mask> log.Debug("dhcpv4: Invalid ClientHWAddr")
<mask> return
<mask> }
<mask>
<mask> r := s.process(req, resp)
<mask> if r < 0 {
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err)
</s> add return fmt.Errorf("interface %s: %w", ifaceName, err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v4.go |
"github.com/AdguardTeam/AdGuardHome/internal/agherr"
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" | <mask> "net"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/insomniacslk/dhcp/dhcpv6"
<mask> "github.com/insomniacslk/dhcp/dhcpv6/server6"
<mask> "github.com/insomniacslk/dhcp/iana"
<mask> )
<mask>
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove func TestRA(t *testing.T) {
data := createICMPv6RAPacket(icmpv6RA{
</s> add func TestCreateICMPv6RAPacket(t *testing.T) {
wantData := []byte{
0x86, 0x00, 0x00, 0x00, 0x40, 0x40, 0x07, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x0e, 0x10,
0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00,
0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0xdc,
0x01, 0x01, 0x0a, 0x00, 0x27, 0x00, 0x00, 0x00,
0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00,
0x0e, 0x10, 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x27, 0xff, 0xfe, 0x00,
0x00, 0x00,
}
gotData, err := createICMPv6RAPacket(icmpv6RA{ </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // Link-Layer Address[6]
</s> add // Link-Layer Address[8/24] | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
// AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| <mask> }
<mask> return nil
<mask> }
<mask>
<mask> // AddStaticLease - add a static lease
<mask> func (s *v6Server) AddStaticLease(l Lease) error {
<mask> if len(l.IP) != 16 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | <mask> func (s *v6Server) AddStaticLease(l Lease) error {
<mask> if len(l.IP) != 16 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
<mask> }
<mask>
<mask> l.Expiry = time.Unix(leaseExpireStatic, 0)
<mask>
<mask> s.leasesLock.Lock()
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
err = s.rmDynamicLease(l) | <mask>
<mask> l.Expiry = time.Unix(leaseExpireStatic, 0)
<mask>
<mask> s.leasesLock.Lock()
<mask> err := s.rmDynamicLease(l)
<mask> if err != nil {
<mask> s.leasesLock.Unlock()
<mask> return err
<mask> }
<mask> s.addLease(&l)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid mac %q, only EUI-48 is supported", l.HWAddr)
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
// RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| <mask> s.conf.notify(LeaseChangedAddedStatic)
<mask> return nil
<mask> }
<mask>
<mask> // RemoveStaticLease - remove a static lease
<mask> func (s *v6Server) RemoveStaticLease(l Lease) error {
<mask> if len(l.IP) != 16 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
</s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | <mask> func (s *v6Server) RemoveStaticLease(l Lease) error {
<mask> if len(l.IP) != 16 {
<mask> return fmt.Errorf("invalid IP")
<mask> }
<mask> if len(l.HWAddr) != 6 {
<mask> return fmt.Errorf("invalid MAC")
<mask> }
<mask>
<mask> s.leasesLock.Lock()
<mask> err := s.rmLease(l)
<mask> if err != nil {
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
err = s.rmLease(l) | <mask> return fmt.Errorf("invalid MAC")
<mask> }
<mask>
<mask> s.leasesLock.Lock()
<mask> err := s.rmLease(l)
<mask> if err != nil {
<mask> s.leasesLock.Unlock()
<mask> return err
<mask> }
<mask> s.conf.notify(LeaseChangedDBStore)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove err := s.rmDynamicLease(l)
</s> add err = s.rmDynamicLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
l := Lease{
HWAddr: make([]byte, len(mac)),
}
| <mask> }
<mask>
<mask> // Reserve lease for MAC
<mask> func (s *v6Server) reserveLease(mac net.HardwareAddr) *Lease {
<mask> l := Lease{}
<mask> l.HWAddr = make([]byte, 6)
<mask> copy(l.HWAddr, mac)
<mask>
<mask> s.leasesLock.Lock()
<mask> defer s.leasesLock.Unlock()
<mask>
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove func (s *v6Server) Start() error {
</s> add func (s *v6Server) Start() (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove // RemoveStaticLease removes a static lease (thread-safe)
func (s *v4Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v4Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv4: %w", &err)
</s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
func (s *v6Server) Start() (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| <mask> return s.ra.Init()
<mask> }
<mask>
<mask> // Start starts the IPv6 DHCP server.
<mask> func (s *v6Server) Start() error {
<mask> if !s.conf.Enabled {
<mask> return nil
<mask> }
<mask>
<mask> ifaceName := s.conf.InterfaceName
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove return fmt.Errorf("dhcpv6: finding interface %s by name: %w", ifaceName, err)
</s> add return fmt.Errorf("finding interface %s by name: %w", ifaceName, err) </s> remove // AddStaticLease - add a static lease
func (s *v6Server) AddStaticLease(l Lease) error {
</s> add // AddStaticLease adds a static lease. It is safe for concurrent use.
func (s *v6Server) AddStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove // RemoveStaticLease - remove a static lease
func (s *v6Server) RemoveStaticLease(l Lease) error {
</s> add // RemoveStaticLease removes a static lease. It is safe for concurrent use.
func (s *v6Server) RemoveStaticLease(l Lease) (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
return fmt.Errorf("finding interface %s by name: %w", ifaceName, err) | <mask>
<mask> ifaceName := s.conf.InterfaceName
<mask> iface, err := net.InterfaceByName(ifaceName)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: finding interface %s by name: %w", ifaceName, err)
<mask> }
<mask>
<mask> log.Debug("dhcpv6: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff)
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err)
</s> add return fmt.Errorf("interface %s: %w", ifaceName, err) </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
return fmt.Errorf("interface %s: %w", ifaceName, err) | <mask> log.Debug("dhcpv6: starting...")
<mask>
<mask> dnsIPAddrs, err := ifaceDNSIPAddrs(iface, ipVersion6, defaultMaxAttempts, defaultBackoff)
<mask> if err != nil {
<mask> return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err)
<mask> }
<mask>
<mask> if len(dnsIPAddrs) == 0 {
<mask> // No available IP addresses which may appear later.
<mask> return nil
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove return fmt.Errorf("dhcpv6: finding interface %s by name: %w", ifaceName, err)
</s> add return fmt.Errorf("finding interface %s by name: %w", ifaceName, err) </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove if len(req.ClientHWAddr) != 6 {
log.Debug("dhcpv4: Invalid ClientHWAddr")
</s> add err = aghnet.ValidateHardwareAddress(req.ClientHWAddr)
if err != nil {
log.Error("dhcpv4: invalid ClientHWAddr: %s", err)
</s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
log.Debug("not starting dhcpv6 server due to ra_slaac_only=true")
| <mask> }
<mask>
<mask> // don't initialize DHCPv6 server if we must force the clients to use SLAAC
<mask> if s.conf.RASLAACOnly {
<mask> log.Debug("DHCPv6: not starting DHCPv6 server due to ra_slaac_only=true")
<mask> return nil
<mask> }
<mask>
<mask> log.Debug("dhcpv6: listening...")
<mask>
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid mac %q, only EUI-48 is supported", l.HWAddr)
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) </s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove func (ra *raCtx) Init() error {
</s> add func (ra *raCtx) Init() (err error) { </s> remove log.Debug("DHCPv6: srv.Serve: %s", err)
</s> add log.Error("dhcpv6: srv.Serve: %s", err) </s> remove func (s *v6Server) Start() error {
</s> add func (s *v6Server) Start() (err error) {
defer agherr.Annotate("dhcpv6: %w", &err)
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) | <mask> }
<mask>
<mask> log.Debug("dhcpv6: listening...")
<mask>
<mask> if len(iface.HardwareAddr) != 6 {
<mask> return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
<mask> }
<mask> s.sid = dhcpv6.Duid{
<mask> Type: dhcpv6.DUID_LLT,
<mask> HwType: iana.HWTypeEthernet,
<mask> LinkLayerAddr: iface.HardwareAddr,
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(req.ClientHWAddr) != 6 {
log.Debug("dhcpv4: Invalid ClientHWAddr")
</s> add err = aghnet.ValidateHardwareAddress(req.ClientHWAddr)
if err != nil {
log.Error("dhcpv4: invalid ClientHWAddr: %s", err)
</s> remove log.Debug("DHCPv6: not starting DHCPv6 server due to ra_slaac_only=true")
</s> add log.Debug("not starting dhcpv6 server due to ra_slaac_only=true")
</s> remove return fmt.Errorf("dhcpv6: interface %s: %w", ifaceName, err)
</s> add return fmt.Errorf("interface %s: %w", ifaceName, err) </s> remove log.Debug("DHCPv6: srv.Serve: %s", err)
</s> add log.Error("dhcpv6: srv.Serve: %s", err) </s> remove return fmt.Errorf("dhcpv6: finding interface %s by name: %w", ifaceName, err)
</s> add return fmt.Errorf("finding interface %s by name: %w", ifaceName, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
log.Error("dhcpv6: srv.Serve: %s", err) | <mask> }
<mask>
<mask> go func() {
<mask> err = s.srv.Serve()
<mask> log.Debug("DHCPv6: srv.Serve: %s", err)
<mask> }()
<mask>
<mask> return nil
<mask> }
<mask>
</s> Pull request: dhcpd: do not assume mac addrs of 6 bytes
Closes #2828.
Squashed commit of the following:
commit 26c6cf81c32469e1c4955aafb40490c29b4d1a99
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Tue Mar 30 17:43:53 2021 +0300
dhcpd: do not assume mac addrs of 6 bytes </s> remove if len(req.ClientHWAddr) != 6 {
log.Debug("dhcpv4: Invalid ClientHWAddr")
</s> add err = aghnet.ValidateHardwareAddress(req.ClientHWAddr)
if err != nil {
log.Error("dhcpv4: invalid ClientHWAddr: %s", err)
</s> remove if len(iface.HardwareAddr) != 6 {
return fmt.Errorf("dhcpv6: invalid MAC %s", iface.HardwareAddr)
</s> add err = aghnet.ValidateHardwareAddress(iface.HardwareAddr)
if err != nil {
return fmt.Errorf("validating interface %s: %w", iface.Name, err) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove err := s.rmLease(l)
</s> add err = s.rmLease(l) </s> remove if len(l.HWAddr) != 6 {
return fmt.Errorf("invalid MAC")
</s> add err = aghnet.ValidateHardwareAddress(l.HWAddr)
if err != nil {
return fmt.Errorf("validating lease: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfc7e16d84037fab30116fcc30931fb8c05980fb | internal/dhcpd/v6.go |
"crypto/x509" | <mask> package dnsforward
<mask>
<mask> import (
<mask> "crypto/tls"
<mask> "fmt"
<mask> "net"
<mask> "net/http"
<mask> "runtime"
<mask> "sort"
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
"sort" | <mask> "fmt"
<mask> "net"
<mask> "net/http"
<mask> "runtime"
<mask> "strings"
<mask> "sync"
<mask> "time"
<mask>
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
"github.com/AdguardTeam/golibs/utils" | <mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/joomcode/errorx"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // DefaultTimeout is the default upstream timeout
<mask> const DefaultTimeout = 10 * time.Second
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
StrictSNICheck bool `yaml:"strict_sni_check" json:"-"` // Reject connection if the client uses server name (in SNI) that doesn't match the certificate | <mask>
<mask> // TLSConfig is the TLS configuration for HTTPS, DNS-over-HTTPS, and DNS-over-TLS
<mask> type TLSConfig struct {
<mask> TLSListenAddr *net.TCPAddr `yaml:"-" json:"-"`
<mask> CertificateChain string `yaml:"certificate_chain" json:"certificate_chain"` // PEM-encoded certificates chain
<mask> PrivateKey string `yaml:"private_key" json:"private_key"` // PEM-encoded private key
<mask>
<mask> CertificatePath string `yaml:"certificate_path" json:"certificate_path"` // certificate file name
<mask> PrivateKeyPath string `yaml:"private_key_path" json:"private_key_path"` // private key file name
<mask>
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
cert tls.Certificate // nolint(structcheck) - linter thinks that this field is unused, while TLSConfig is directly included into ServerConfig
dnsNames []string // nolint(structcheck) // DNS names from certificate (SAN) or CN value from Subject | <mask> CertificateChainData []byte `yaml:"-" json:"-"`
<mask> PrivateKeyData []byte `yaml:"-" json:"-"`
<mask> }
<mask>
<mask> // ServerConfig represents server configuration.
<mask> // The zero ServerConfig is empty and ready for use.
<mask> type ServerConfig struct {
<mask> UDPListenAddr *net.UDPAddr // UDP listen address
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
// nolint(gocyclo) | <mask> return err
<mask> }
<mask>
<mask> // Prepare the object
<mask> func (s *Server) Prepare(config *ServerConfig) error {
<mask> if config != nil {
<mask> s.conf = *config
<mask> if s.conf.BlockingMode == "custom_ip" {
<mask> s.conf.BlockingIPAddrv4 = net.ParseIP(s.conf.BlockingIPv4)
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | <mask> }
<mask>
<mask> if s.conf.TLSListenAddr != nil && len(s.conf.CertificateChainData) != 0 && len(s.conf.PrivateKeyData) != 0 {
<mask> proxyConfig.TLSListenAddr = s.conf.TLSListenAddr
<mask> keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
<mask> if err != nil {
<mask> return errorx.Decorate(err, "Failed to parse TLS keypair")
<mask> }
<mask> proxyConfig.TLSConfig = &tls.Config{
<mask> Certificates: []tls.Certificate{keypair},
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
if s.conf.StrictSNICheck {
x, err := x509.ParseCertificate(s.conf.cert.Certificate[0])
if err != nil {
return errorx.Decorate(err, "x509.ParseCertificate(): %s", err)
}
if len(x.DNSNames) != 0 {
s.conf.dnsNames = x.DNSNames
log.Debug("DNS: using DNS names from certificate's SAN: %v", x.DNSNames)
sort.Strings(s.conf.dnsNames)
} else {
s.conf.dnsNames = append(s.conf.dnsNames, x.Subject.CommonName)
log.Debug("DNS: using DNS name from certificate's CN: %s", x.Subject.CommonName)
}
}
| <mask> s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
<mask> if err != nil {
<mask> return errorx.Decorate(err, "Failed to parse TLS keypair")
<mask> }
<mask> proxyConfig.TLSConfig = &tls.Config{
<mask> GetCertificate: s.onGetCertificate,
<mask> MinVersion: tls.VersionTLS12,
<mask> }
<mask> }
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, | <mask> if err != nil {
<mask> return errorx.Decorate(err, "Failed to parse TLS keypair")
<mask> }
<mask> proxyConfig.TLSConfig = &tls.Config{
<mask> Certificates: []tls.Certificate{keypair},
<mask> MinVersion: tls.VersionTLS12,
<mask> }
<mask> }
<mask>
<mask> if len(proxyConfig.Upstreams) == 0 {
<mask> log.Fatal("len(proxyConfig.Upstreams) == 0")
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward.go |
"sort" | <mask> "encoding/pem"
<mask> "math/big"
<mask> "net"
<mask> "sync"
<mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dnsfilter"
</s> + DNS: TLS handshake: terminate handshake on bad SNI </s> remove Certificates: []tls.Certificate{keypair},
MinVersion: tls.VersionTLS12,
</s> add GetCertificate: s.onGetCertificate,
MinVersion: tls.VersionTLS12, </s> remove keypair, err := tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData)
</s> add s.conf.cert, err = tls.X509KeyPair(s.conf.CertificateChainData, s.conf.PrivateKeyData) | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/bfd1f3b6506e45ae59e90d012e0be5c2dc0b5261 | dnsforward/dnsforward_test.go |
const { dashboard, encryption } = this.props; | <mask> });
<mask> }
<mask>
<mask> render() {
<mask> const { dashboard } = this.props;
<mask> const updateAvailable =
<mask> !dashboard.processingVersions &&
<mask> dashboard.isCoreRunning &&
<mask> dashboard.isUpdateAvailable;
<mask> const isExpiringCertificate = false;
</s> Show random status and warning </s> remove const isExpiringCertificate = false;
</s> add const isExpiringCertificate = !encryption.processing && encryption.warning; </s> remove import React from 'react';
</s> add import React, { Fragment } from 'react'; </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/App/index.js |
const isExpiringCertificate = !encryption.processing && encryption.warning; | <mask> const updateAvailable =
<mask> !dashboard.processingVersions &&
<mask> dashboard.isCoreRunning &&
<mask> dashboard.isUpdateAvailable;
<mask> const isExpiringCertificate = false;
<mask>
<mask> return (
<mask> <HashRouter hashType='noslash'>
<mask> <Fragment>
<mask> {updateAvailable &&
</s> Show random status and warning </s> remove const { dashboard } = this.props;
</s> add const { dashboard, encryption } = this.props; </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>Valid RSA private key</div>
</s> add {statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/App/index.js |
import React, { Fragment } from 'react'; | <mask> import React from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Field, reduxForm } from 'redux-form';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import flow from 'lodash/flow';
<mask>
</s> Show random status and warning </s> remove const { dashboard } = this.props;
</s> add const { dashboard, encryption } = this.props; </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
statusCert,
statusKey, | <mask> handleSubmit,
<mask> invalid,
<mask> submitting,
<mask> processing,
<mask> } = props;
<mask>
<mask> return (
<mask> <form onSubmit={handleSubmit}>
<mask> <div className="row">
</s> Show random status and warning </s> remove const isExpiringCertificate = false;
</s> add const isExpiringCertificate = !encryption.processing && encryption.warning; </s> remove </div>
</s> add </div> */} </s> remove const { dashboard } = this.props;
</s> add const { dashboard, encryption } = this.props; </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
{statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> | <mask> placeholder={t('encryption_certificates_input')}
<mask> validate={[required]}
<mask> />
<mask> <div className="form__status">
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>
<mask> <Trans values={{ domains: '*.example.org, example.org' }}>
<mask> encryption_certificates_for
<mask> </Trans>
<mask> </div>
<mask> <div>
</s> Show random status and warning </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>Valid RSA private key</div>
</s> add {statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} </s> remove </div>
</s> add </div> */} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
</div> */} | <mask> <div>
<mask> <Trans values={{ date: '2022-01-01' }}>
<mask> encryption_expire
<mask> </Trans>
<mask> </div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask> <div className="row">
</s> Show random status and warning </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>Valid RSA private key</div>
</s> add {statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
{statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} | <mask> placeholder="Copy/paste your PEM-encoded private key for your cerficate here."
<mask> validate={[required]}
<mask> />
<mask> <div className="form__status">
<mask> <div className="form__label form__label--bold">
<mask> <Trans>encryption_status</Trans>:
<mask> </div>
<mask> <div>Valid RSA private key</div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask> </div>
<mask>
</s> Show random status and warning </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> </s> remove </div>
</s> add </div> */} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
statusCert: PropTypes.string,
statusKey: PropTypes.string, | <mask> invalid: PropTypes.bool.isRequired,
<mask> initialValues: PropTypes.object.isRequired,
<mask> processing: PropTypes.bool.isRequired,
<mask> t: PropTypes.func.isRequired,
<mask> };
<mask>
<mask> export default flow([
<mask> withNamespaces(),
<mask> reduxForm({
</s> Show random status and warning </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>Valid RSA private key</div>
</s> add {statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} </s> remove </div>
</s> add </div> */} </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/Form.js |
status_cert: statusCert,
status_key: statusKey, | <mask> const {
<mask> processing,
<mask> processingConfig,
<mask> ...values
<mask> } = encryption;
<mask>
<mask> return (
</s> Show random status and warning </s> remove const { dashboard } = this.props;
</s> add const { dashboard, encryption } = this.props; </s> remove const isExpiringCertificate = false;
</s> add const isExpiringCertificate = !encryption.processing && encryption.warning; </s> remove import React from 'react';
</s> add import React, { Fragment } from 'react'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/index.js |
statusCert={statusCert}
statusKey={statusKey} | <mask> initialValues={{ ...values }}
<mask> processing={encryption.processingConfig}
<mask> onSubmit={this.handleFormSubmit}
<mask> />
<mask> </Card>
<mask> }
<mask> </div>
</s> Show random status and warning </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>Valid RSA private key</div>
</s> add {statusKey &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusKey}
</div>
</Fragment>
} </s> remove <div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
</s> add {statusCert &&
<Fragment>
<div className="form__label form__label--bold">
<Trans>encryption_status</Trans>:
</div>
<div>
{statusCert}
</div>
</Fragment>
}
{/* <div> </s> remove </div>
</s> add </div> */} </s> remove const { dashboard } = this.props;
</s> add const { dashboard, encryption } = this.props; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c025c845d200be5e6e5a08f86c6512b7740f876e | client/src/components/Settings/Encryption/index.js |
<mask> import (
<mask> "bytes"
<mask> "compress/gzip"
<mask> "encoding/json"
<mask> "fmt"
<mask> "io"
<mask> "os"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
</s> - querylog: writing to a file could stop randomly </s> remove func checkBuffer(buffer []*logEntry, b bytes.Buffer) error {
l := len(buffer)
d := json.NewDecoder(&b)
i := 0
for d.More() {
entry := &logEntry{}
err := d.Decode(entry)
if err != nil {
log.Error("Failed to decode: %s", err)
return err
}
if diff := deep.Equal(entry, buffer[i]); diff != nil {
log.Error("decoded buffer differs: %s", diff)
return fmt.Errorf("decoded buffer differs: %s", diff)
}
i++
}
if i != l {
err := fmt.Errorf("check fail: %d vs %d entries", l, i)
log.Error("%v", err)
return err
}
log.Debug("check ok: %d entries", i)
return nil
}
</s> add </s> remove err := checkBuffer(buffer, b)
if err != nil {
log.Error("failed to check buffer: %s", err)
return err
}
</s> add var err error </s> remove "github.com/go-test/deep"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c04705364663e7141d39764fce8fd1dc1a4633ab | querylog/querylog_file.go | |
<mask> "os"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/go-test/deep"
<mask> )
<mask>
<mask> const enableGzip = false
<mask> const maxEntrySize = 1000
<mask>
</s> - querylog: writing to a file could stop randomly </s> remove err := checkBuffer(buffer, b)
if err != nil {
log.Error("failed to check buffer: %s", err)
return err
}
</s> add var err error </s> remove func checkBuffer(buffer []*logEntry, b bytes.Buffer) error {
l := len(buffer)
d := json.NewDecoder(&b)
i := 0
for d.More() {
entry := &logEntry{}
err := d.Decode(entry)
if err != nil {
log.Error("Failed to decode: %s", err)
return err
}
if diff := deep.Equal(entry, buffer[i]); diff != nil {
log.Error("decoded buffer differs: %s", diff)
return fmt.Errorf("decoded buffer differs: %s", diff)
}
i++
}
if i != l {
err := fmt.Errorf("check fail: %d vs %d entries", l, i)
log.Error("%v", err)
return err
}
log.Debug("check ok: %d entries", i)
return nil
}
</s> add </s> remove "fmt"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c04705364663e7141d39764fce8fd1dc1a4633ab | querylog/querylog_file.go | |
var err error | <mask>
<mask> elapsed := time.Since(start)
<mask> log.Debug("%d elements serialized via json in %v: %d kB, %v/entry, %v/entry", len(buffer), elapsed, b.Len()/1024, float64(b.Len())/float64(len(buffer)), elapsed/time.Duration(len(buffer)))
<mask>
<mask> err := checkBuffer(buffer, b)
<mask> if err != nil {
<mask> log.Error("failed to check buffer: %s", err)
<mask> return err
<mask> }
<mask>
<mask> var zb bytes.Buffer
<mask> filename := l.logFile
<mask>
<mask> // gzip enabled?
<mask> if enableGzip {
</s> - querylog: writing to a file could stop randomly </s> remove "github.com/go-test/deep"
</s> add </s> remove func checkBuffer(buffer []*logEntry, b bytes.Buffer) error {
l := len(buffer)
d := json.NewDecoder(&b)
i := 0
for d.More() {
entry := &logEntry{}
err := d.Decode(entry)
if err != nil {
log.Error("Failed to decode: %s", err)
return err
}
if diff := deep.Equal(entry, buffer[i]); diff != nil {
log.Error("decoded buffer differs: %s", diff)
return fmt.Errorf("decoded buffer differs: %s", diff)
}
i++
}
if i != l {
err := fmt.Errorf("check fail: %d vs %d entries", l, i)
log.Error("%v", err)
return err
}
log.Debug("check ok: %d entries", i)
return nil
}
</s> add </s> remove "fmt"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c04705364663e7141d39764fce8fd1dc1a4633ab | querylog/querylog_file.go |
<mask>
<mask> return nil
<mask> }
<mask>
<mask> func checkBuffer(buffer []*logEntry, b bytes.Buffer) error {
<mask> l := len(buffer)
<mask> d := json.NewDecoder(&b)
<mask>
<mask> i := 0
<mask> for d.More() {
<mask> entry := &logEntry{}
<mask> err := d.Decode(entry)
<mask> if err != nil {
<mask> log.Error("Failed to decode: %s", err)
<mask> return err
<mask> }
<mask> if diff := deep.Equal(entry, buffer[i]); diff != nil {
<mask> log.Error("decoded buffer differs: %s", diff)
<mask> return fmt.Errorf("decoded buffer differs: %s", diff)
<mask> }
<mask> i++
<mask> }
<mask> if i != l {
<mask> err := fmt.Errorf("check fail: %d vs %d entries", l, i)
<mask> log.Error("%v", err)
<mask> return err
<mask> }
<mask> log.Debug("check ok: %d entries", i)
<mask>
<mask> return nil
<mask> }
<mask>
<mask> func (l *queryLog) rotate() error {
<mask> from := l.logFile
<mask> to := l.logFile + ".1"
<mask>
<mask> if enableGzip {
</s> - querylog: writing to a file could stop randomly </s> remove "github.com/go-test/deep"
</s> add </s> remove err := checkBuffer(buffer, b)
if err != nil {
log.Error("failed to check buffer: %s", err)
return err
}
</s> add var err error </s> remove "fmt"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/AdguardTeam/AdGuardHome/commit/c04705364663e7141d39764fce8fd1dc1a4633ab | querylog/querylog_file.go | |
'GO_VERSION': '1.15' | <mask> 'name': 'build'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.14'
<mask> 'NODE_VERSION': '14'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'branches':
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove howett.net/plist v0.0.0-20201026045517-117a925f2150 h1:s7O/9fwMNd6O1yXyQ8zv+U7dfl8k+zdiLWAY8h7XdVI=
howett.net/plist v0.0.0-20201026045517-117a925f2150/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
</s> add howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/NqaQTcf9jyz347nI58=
howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= </s> remove "io/ioutil"
"os"
"runtime"
</s> add </s> remove "time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
</s> add | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | .github/workflows/build.yml |
GOPROXY = https://goproxy.io|https://goproxy.cn|direct | <mask> CLIENT_DIR = client
<mask> COMMIT = $$(git rev-parse --short HEAD)
<mask> DIST_DIR = dist
<mask> GO = go
<mask> # TODO(a.garipov): Add more default proxies using pipes after update to
<mask> # Go 1.15.
<mask> #
<mask> # GOPROXY = https://goproxy.io|https://goproxy.cn|direct
<mask> GOPROXY = https://goproxy.cn,https://goproxy.io,direct
<mask> GPG_KEY = devteam@adguard.com
<mask> GPG_KEY_PASSPHRASE = not-a-real-password
<mask> NPM = npm
<mask> NPM_FLAGS = --prefix $(CLIENT_DIR)
<mask> SIGN = 1
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove c.upstreamConfig = &config
</s> add c.upstreamConfig = &conf </s> remove upstreamConfig, err := proxy.ParseUpstreamsConfig(upstreams,
</s> add upstreamConfig, err := proxy.ParseUpstreamsConfig(
upstreams, </s> remove ip := ipAddrs[0].IP
for _, ipAddr := range ipAddrs {
if ipAddr.IP.To4() != nil {
ip = ipAddr.IP
</s> add var ip net.IP
for _, foundIP := range ips {
if foundIP.To4() != nil {
ip = foundIP
</s> remove l := d.setCacheResult(gctx.safeSearchCache, host, res)
log.Debug("SafeSearch: stored in cache: %s (%d bytes)", host, l)
</s> add res.Rules[0].IP = ip </s> remove for _, ipAddr := range ipAddrs {
if ipv4 := ipAddr.IP.To4(); ipv4 != nil {
res.Rules[0].IP = ipv4
</s> add for _, ip := range ips {
if ip = ip.To4(); ip == nil {
continue
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | Makefile |
go 1.15 | <mask> module github.com/AdguardTeam/AdGuardHome
<mask>
<mask> go 1.14
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.35.5
<mask> github.com/AdguardTeam/golibs v0.4.4
<mask> github.com/AdguardTeam/urlfilter v0.14.3
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/ameshkov/dnscrypt/v2 v2.0.1
</s> add github.com/ameshkov/dnscrypt/v2 v2.0.3 </s> remove dmitri.shuralyov.com/go/generated v0.0.0-20170818220700-b1254a446363 // indirect
github.com/client9/misspell v0.3.4 // indirect
</s> add </s> remove // Package tools and its main module are a nested internal module containing our
// development tool dependencies.
//
// See https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module.
</s> add </s> remove "io/ioutil"
"os"
"runtime"
</s> add </s> remove //
// TODO(e.burkov): Replace with LookupIP after upgrading go to v1.15.
</s> add | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/ameshkov/dnscrypt/v2 v2.0.3 | <mask> github.com/AdguardTeam/dnsproxy v0.35.5
<mask> github.com/AdguardTeam/golibs v0.4.4
<mask> github.com/AdguardTeam/urlfilter v0.14.3
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.1
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsnotify v1.4.9
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
<mask> github.com/gobuffalo/envy v1.9.0 // indirect
<mask> github.com/gobuffalo/packr v1.30.1
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb </s> remove go 1.14
</s> add go 1.15 </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663 h1:jI2GiiRh+pPbey52EVmbU6kuLiXqwy4CXZ4gwUBj8Y0=
github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb h1:2opwLSXqxE0Za64PdpskXuvLYDj/XHQAD8tLcYpSlvY=
github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb | <mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.1
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsnotify v1.4.9
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
<mask> github.com/gobuffalo/envy v1.9.0 // indirect
<mask> github.com/gobuffalo/packr v1.30.1
<mask> github.com/gobuffalo/packr/v2 v2.8.1 // indirect
<mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714
<mask> github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/ameshkov/dnscrypt/v2 v2.0.1
</s> add github.com/ameshkov/dnscrypt/v2 v2.0.3 </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1 // indirect
</s> add github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/google/go-cmp v0.5.5 // indirect | <mask> github.com/gobuffalo/packr v1.30.1
<mask> github.com/gobuffalo/packr/v2 v2.8.1 // indirect
<mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714
<mask> github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb
<mask> github.com/kardianos/service v1.2.0
<mask> github.com/karrick/godirwalk v1.16.1 // indirect
<mask> github.com/lucas-clemente/quic-go v0.19.3
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb </s> remove github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> add github.com/mdlayher/netlink v1.4.0 </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb | <mask> github.com/gobuffalo/envy v1.9.0 // indirect
<mask> github.com/gobuffalo/packr v1.30.1
<mask> github.com/gobuffalo/packr/v2 v2.8.1 // indirect
<mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714
<mask> github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
<mask> github.com/kardianos/service v1.2.0
<mask> github.com/karrick/godirwalk v1.16.1 // indirect
<mask> github.com/lucas-clemente/quic-go v0.19.3
<mask> github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7
<mask> github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb </s> remove github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> add github.com/mdlayher/netlink v1.4.0 </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/marten-seemann/qtls-go1-15 v0.1.4 // indirect | <mask> github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb
<mask> github.com/kardianos/service v1.2.0
<mask> github.com/karrick/godirwalk v1.16.1 // indirect
<mask> github.com/lucas-clemente/quic-go v0.19.3
<mask> github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7
<mask> github.com/mdlayher/netlink v1.4.0
<mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065
<mask> github.com/miekg/dns v1.1.40
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> add github.com/mdlayher/netlink v1.4.0 </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/mdlayher/netlink v1.4.0 | <mask> github.com/kardianos/service v1.2.0
<mask> github.com/karrick/godirwalk v1.16.1 // indirect
<mask> github.com/lucas-clemente/quic-go v0.19.3
<mask> github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7
<mask> github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
<mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065
<mask> github.com/miekg/dns v1.1.35
<mask> github.com/rogpeppe/go-internal v1.6.2 // indirect
<mask> github.com/satori/go.uuid v1.2.0
<mask> github.com/sirupsen/logrus v1.7.0 // indirect
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1 // indirect
</s> add github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect | <mask> github.com/lucas-clemente/quic-go v0.19.3
<mask> github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7
<mask> github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
<mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065
<mask> github.com/miekg/dns v1.1.35
<mask> github.com/rogpeppe/go-internal v1.6.2 // indirect
<mask> github.com/satori/go.uuid v1.2.0
<mask> github.com/sirupsen/logrus v1.7.0 // indirect
<mask> github.com/spf13/cobra v1.1.1 // indirect
<mask> github.com/stretchr/testify v1.6.1
<mask> github.com/ti-mo/netfilter v0.4.0
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> add github.com/mdlayher/netlink v1.4.0 </s> remove github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1 // indirect
</s> add github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
golang.org/x/net v0.0.0-20201216054612-986b41b23924
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
</s> add golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.5 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect | <mask> github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065
<mask> github.com/miekg/dns v1.1.35
<mask> github.com/rogpeppe/go-internal v1.6.2 // indirect
<mask> github.com/satori/go.uuid v1.2.0
<mask> github.com/sirupsen/logrus v1.7.0 // indirect
<mask> github.com/spf13/cobra v1.1.1 // indirect
<mask> github.com/stretchr/testify v1.6.1
<mask> github.com/ti-mo/netfilter v0.4.0
<mask> github.com/u-root/u-root v7.0.0+incompatible
<mask> go.etcd.io/bbolt v1.3.5
<mask> golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect </s> remove github.com/mdlayher/netlink v1.1.2-0.20201013204415-ded538f7f4be
</s> add github.com/mdlayher/netlink v1.4.0 </s> remove golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
golang.org/x/net v0.0.0-20201216054612-986b41b23924
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
</s> add golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.5 // indirect </s> remove github.com/google/go-cmp v0.5.4 // indirect
github.com/gookit/color v1.3.3 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20201107091007-3b93a8888063
github.com/kisielk/errcheck v1.4.0
</s> add github.com/google/go-cmp v0.5.5 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254
github.com/kisielk/errcheck v1.6.0 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.5 // indirect | <mask> github.com/stretchr/testify v1.6.1
<mask> github.com/ti-mo/netfilter v0.4.0
<mask> github.com/u-root/u-root v7.0.0+incompatible
<mask> go.etcd.io/bbolt v1.3.5
<mask> golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
<mask> golang.org/x/net v0.0.0-20201216054612-986b41b23924
<mask> golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
<mask> golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
<mask> golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
<mask> gopkg.in/natefinch/lumberjack.v2 v2.0.0
<mask> gopkg.in/yaml.v2 v2.3.0
<mask> howett.net/plist v0.0.0-20201026045517-117a925f2150
<mask> )
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove gopkg.in/yaml.v2 v2.3.0
howett.net/plist v0.0.0-20201026045517-117a925f2150
</s> add gopkg.in/yaml.v2 v2.4.0
howett.net/plist v0.0.0-20201203080718-1454fab16a06 </s> remove github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1 // indirect
</s> add github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect </s> remove github.com/miekg/dns v1.1.35
github.com/rogpeppe/go-internal v1.6.2 // indirect
</s> add github.com/miekg/dns v1.1.40
github.com/rogpeppe/go-internal v1.7.0 // indirect </s> remove github.com/securego/gosec/v2 v2.5.0
golang.org/x/lint v0.0.0-20200302205851-738671d3881b
golang.org/x/mod v0.4.0 // indirect
golang.org/x/tools v0.0.0-20201208062317-e652b2f42cc7
gopkg.in/yaml.v2 v2.4.0 // indirect
honnef.co/go/tools v0.1.0
mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7
</s> add github.com/securego/gosec/v2 v2.7.0
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect
golang.org/x/tools v0.1.0
honnef.co/go/tools v0.1.3
mvdan.cc/gofumpt v0.1.0
mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 </s> remove github.com/google/go-cmp v0.5.4 // indirect
github.com/gookit/color v1.3.3 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20201107091007-3b93a8888063
github.com/kisielk/errcheck v1.4.0
</s> add github.com/google/go-cmp v0.5.5 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254
github.com/kisielk/errcheck v1.6.0 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
gopkg.in/yaml.v2 v2.4.0
howett.net/plist v0.0.0-20201203080718-1454fab16a06 | <mask> golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
<mask> golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
<mask> golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
<mask> gopkg.in/natefinch/lumberjack.v2 v2.0.0
<mask> gopkg.in/yaml.v2 v2.3.0
<mask> howett.net/plist v0.0.0-20201026045517-117a925f2150
<mask> )
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
golang.org/x/net v0.0.0-20201216054612-986b41b23924
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
</s> add golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.5 // indirect </s> remove github.com/securego/gosec/v2 v2.5.0
golang.org/x/lint v0.0.0-20200302205851-738671d3881b
golang.org/x/mod v0.4.0 // indirect
golang.org/x/tools v0.0.0-20201208062317-e652b2f42cc7
gopkg.in/yaml.v2 v2.4.0 // indirect
honnef.co/go/tools v0.1.0
mvdan.cc/gofumpt v0.0.0-20201129102820-5c11c50e9475
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7
</s> add github.com/securego/gosec/v2 v2.7.0
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect
golang.org/x/tools v0.1.0
honnef.co/go/tools v0.1.3
mvdan.cc/gofumpt v0.1.0
mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 </s> remove github.com/google/go-cmp v0.5.4 // indirect
github.com/gookit/color v1.3.3 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20201107091007-3b93a8888063
github.com/kisielk/errcheck v1.4.0
</s> add github.com/google/go-cmp v0.5.5 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254
github.com/kisielk/errcheck v1.6.0 </s> remove dmitri.shuralyov.com/go/generated v0.0.0-20170818220700-b1254a446363 // indirect
github.com/client9/misspell v0.3.4 // indirect
</s> add </s> remove github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1 // indirect
</s> add github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.1.3 // indirect | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.mod |
github.com/ameshkov/dnscrypt/v2 v2.0.3 h1:PE6VVc8QUMYJv9dTwcDcX5cYXf58XPi1WVPHrLf8MDs=
github.com/ameshkov/dnscrypt/v2 v2.0.3/go.mod h1:nbZnxJt4edIPx2Haa8n2XtC2g5AWcsdQiSuXkNH8eDI= | <mask> github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.1 h1:igNVNM6NLBOqYUzHXaDUxn8i+wJXOsosY0/xEBirixA=
<mask> github.com/ameshkov/dnscrypt/v2 v2.0.1/go.mod h1:nbZnxJt4edIPx2Haa8n2XtC2g5AWcsdQiSuXkNH8eDI=
<mask> github.com/ameshkov/dnsstamps v1.0.1 h1:LhGvgWDzhNJh+kBQd/AfUlq1vfVe109huiXw4JhnPug=
<mask> github.com/ameshkov/dnsstamps v1.0.1/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A=
<mask> github.com/ameshkov/dnsstamps v1.0.3 h1:Srzik+J9mivH1alRACTbys2xOxs0lRH9qnTA7Y1OYVo=
<mask> github.com/ameshkov/dnsstamps v1.0.3/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A=
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/ameshkov/dnscrypt/v2 v2.0.1
</s> add github.com/ameshkov/dnscrypt/v2 v2.0.3 </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb </s> remove github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
</s> add github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= </s> remove github.com/securego/gosec/v2 v2.5.0 h1:kjfXLeKdk98gBe2+eYRFMpC4+mxmQQtbidpiiOQ69Qc=
github.com/securego/gosec/v2 v2.5.0/go.mod h1:L/CDXVntIff5ypVHIkqPXbtRpJiNCh6c6Amn68jXDjo=
</s> add github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/securego/gosec/v2 v2.7.0 h1:mOhJv5w6UyNLpSssQOQCc7eGkKLuicAxvf66Ey/X4xk=
github.com/securego/gosec/v2 v2.7.0/go.mod h1:xNbGArrGUspJLuz3LS5XCY1EBW/0vABAl/LWfSklmiM=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.sum |
github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb h1:2opwLSXqxE0Za64PdpskXuvLYDj/XHQAD8tLcYpSlvY=
github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI= | <mask> github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
<mask> github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
<mask> github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
<mask> github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663 h1:jI2GiiRh+pPbey52EVmbU6kuLiXqwy4CXZ4gwUBj8Y0=
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
<mask> github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
<mask> github.com/go-test/deep v1.0.5 h1:AKODKU3pDH1RzZzm6YZu77YWtEAq6uh1rLIAQlay2qc=
<mask> github.com/go-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
<mask> github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU=
<mask> github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
</s> Pull request: all: update go and backend tools
Updates #2275.
Squashed commit of the following:
commit f24c26cd2b49fac00a581936da4ccb13ca341bc9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:33:15 2021 +0300
aghtest: imp docs
commit 46f5b06f9743e800b489e8c30af07d24bfdcf989
Merge: bfb852cb 55d4c7ee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 21:32:32 2021 +0300
Merge branch 'master' into 2275-upd
commit bfb852cbc74ec219a41e985f2dcb090d58299aee
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 19:06:32 2021 +0300
scripts: rem unsupported platform
commit c1645e247f18d384a980c60d3a94b9363f83f174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:47:57 2021 +0300
all: rollback more
commit 989811b5e38498234dc11baf5dd153c76b9dada4
Merge: 976bdfbd 2d704242
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:30:42 2021 +0300
Merge branch 'master' into 2275-upd
commit 976bdfbdd44983f4cd657a486b94ff63f5885fd5
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:28:23 2021 +0300
aghtest: fix os_windows
commit 9e85080eefe882d72c939969f7008e3c46467c0c
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Wed Mar 10 18:15:37 2021 +0300
all: rewrite windows workaround, imp code, docs
commit 35a0b1d8656640a962fe9ae019c3d665f42707ce
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Thu Jan 21 20:38:17 2021 +0300
all: update go and backend tools </s> remove github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
</s> add github.com/go-ping/ping v0.0.0-20210216210419-25d1413fb7bb </s> remove github.com/ameshkov/dnscrypt/v2 v2.0.1
</s> add github.com/ameshkov/dnscrypt/v2 v2.0.3 </s> remove github.com/insomniacslk/dhcp v0.0.0-20201112113307-4de412bc85d8
</s> add github.com/insomniacslk/dhcp v0.0.0-20210306224058-018caddcb1eb </s> remove github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
</s> add github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= </s> remove github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0=
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
</s> add github.com/rogpeppe/go-internal v1.7.0 h1:3qqXGV8nn7GJT65debw77Dzrx9sfWYgP0DDo7xcMFRk=
github.com/rogpeppe/go-internal v1.7.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/c08bf86b710e97d5506774fda26358146044edcc | go.sum |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.