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/+/2338?usp=email

to review the following change.


Change subject: vlan: fix byte order in debug message and comment typos
......................................................................

vlan: fix byte order in debug message and comment typos

vlan_encapsulate() logged the inner proto in network byte order;
print it with ntohs() and a 0x prefix like the other messages.

Its comment also claimed it is only used for VLAN_ONLY_TAGGED, but
it is called for VLAN_ALL too.

Change-Id: I512c18dd685885f5d9dc49b29021e22325827494
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/vlan.c
1 file changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/38/2338/1

diff --git a/src/openvpn/vlan.c b/src/openvpn/vlan.c
index d44dac1..2ed1fe6 100644
--- a/src/openvpn/vlan.c
+++ b/src/openvpn/vlan.c
@@ -76,7 +76,7 @@
  *
  * For vlan_accept == VLAN_ALL:
  *   Accepts both VLAN-tagged and untagged (or priority-tagged) frames and
- *   and handles them as described above.
+ *   handles them as described above.
  *
  * @param c   The global context.
  * @param buf The ethernet frame.
@@ -182,7 +182,7 @@
 /*
  * vlan_encapsulate - add 802.1q header and set the context related VID
  *
- * Assumes vlan_accept == VLAN_ONLY_TAGGED
+ * Assumes vlan_accept == VLAN_ONLY_TAGGED or VLAN_ALL
  *
  * @param c   The current context.
  * @param buf The ethernet frame to encapsulate.
@@ -249,8 +249,8 @@
     /* set the VID corresponding to the current context (client) */
     vlanhdr_set_vid(vlanhdr, c->options.vlan_pvid);

-    msg(D_VLAN_DEBUG, "tagging frame: vid %u (wrapping proto/len: %04x)", 
c->options.vlan_pvid,
-        vlanhdr->proto);
+    msg(D_VLAN_DEBUG, "tagging frame: vid %u (wrapping proto/len: 0x%04x)", 
c->options.vlan_pvid,
+        ntohs(vlanhdr->proto));
     return;

 drop:
@@ -289,7 +289,7 @@
     vid = vlanhdr_get_vid(vlanhdr);
     if (vid == 0)
     {
-        /* no vid: piority tagged only */
+        /* no vid: priority tagged only */
         return false;
     }


--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2338?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: I512c18dd685885f5d9dc49b29021e22325827494
Gerrit-Change-Number: 2338
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[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