[riot-notifications] [RIOT-OS/RIOT] Add MUD URL option to DHCPv6 client (#15508)
benpicco
notifications at github.com
Mon Nov 30 11:27:16 CET 2020
@benpicco commented on this pull request.
> @@ -247,6 +247,22 @@ static inline size_t _compose_elapsed_time_opt(dhcpv6_opt_elapsed_time_t *time)
return len + sizeof(dhcpv6_opt_t);
}
+static inline size_t _compose_mud_url_opt(dhcpv6_opt_mud_url_t *mud_url_opt,
+ const char *mud_url, size_t len_max)
+{
+ uint16_t len = strlen(mud_url);
+
+ if (len > len_max) {
+ assert(0);
+ return 0;
+ }
+
+ mud_url_opt->type = byteorder_htons(DHCPV6_OPT_MUD_URL);
+ mud_url_opt->len = byteorder_htons(len);
+ strncpy(mud_url_opt->mudString, mud_url, len);
```suggestion
strncpy(mud_url_opt->mudString, mud_url, len_max);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15508#pullrequestreview-540775072
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/14833b6a/attachment.htm>
More information about the notifications
mailing list