-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(console): Added command getaddrinfo, set/get dnsserver to console_cmd_ping #584
feat(console): Added command getaddrinfo, set/get dnsserver to console_cmd_ping #584
Conversation
a5f7452
to
40dc9ed
Compare
* | ||
* @return esp_err_t Returns ESP_OK on success, or an error code on failure. | ||
*/ | ||
static esp_err_t set_dns_server(uint32_t addr, esp_netif_dns_type_t type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we support only IPv4 addresses?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial implementation was only for ipv4. Updated to use ipv6 also.
Now this is supported
setdnsserver 8.8.8.8 fe80::b0be:83ff:fe77:dd64 www.xyz.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just left few nitpicks
40dc9ed
to
34dd001
Compare
while ((esp_netif = esp_netif_next(esp_netif)) != NULL) { | ||
#endif | ||
struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)res_tmp->ai_addr; | ||
memcpy(dns.ip.u_addr.ip6.addr, &ipv6->sin6_addr, sizeof(dns.ip.u_addr.ip6.addr)); |
Check warning
Code scanning / clang-tidy
Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning
34dd001
to
01526fb
Compare
1.1.0 Features - Added command getaddrinfo, set/get dnsserver to console_cmd_ping (b80c19d)
01526fb
to
c41e889
Compare
Added command getaddrinfo, setdnsserver, getdnsserver to console_cmd_ping component.
Removed WHOLE_ARCHIVE from CMakelist, and allows users to disable auto-registration of console_cmd_ping component.