Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2383?usp=email

to review the following change.


Change subject: domain_helper: add doxygen comments
......................................................................

domain_helper: add doxygen comments

Document that the domain name character check also accepts non-ASCII
bytes, which its name does not suggest.

Change-Id: I0fb10c5c922a437b0a7f06c99e2f692a8b3f86ae
Signed-off-by: Heiko Hund <[email protected]>
---
M src/openvpn/domain_helper.h
1 file changed, 17 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/83/2383/1

diff --git a/src/openvpn/domain_helper.h b/src/openvpn/domain_helper.h
index be9c116..ea21a22 100644
--- a/src/openvpn/domain_helper.h
+++ b/src/openvpn/domain_helper.h
@@ -21,6 +21,16 @@
  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */

+/**
+ * Check if a character is allowed in a domain name
+ *
+ * Besides letters and digits, dots, dashes and underscores are allowed.
+ * Non-ASCII bytes are accepted as well, so that UTF-8 encoded names pass.
+ *
+ * @param  c        character to check
+ *
+ * @return bool to indicate if the character is allowed
+ */
 static inline bool
 is_allowed_domain_ascii(unsigned char c)
 {
@@ -30,6 +40,13 @@
            || c == '.' || c == '-' || c == '_' || c >= 0x80;
 }

+/**
+ * Check if a domain name contains only allowed characters
+ *
+ * @param  domain   NUL terminated domain name
+ *
+ * @return bool to indicate if the domain name is valid
+ */
 static inline bool
 validate_domain(const char *domain)
 {

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2383?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0fb10c5c922a437b0a7f06c99e2f692a8b3f86ae
Gerrit-Change-Number: 2383
Gerrit-PatchSet: 1
Gerrit-Owner: Heiko Hund <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to