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

to review the following change.


Change subject: test_pkt: Correct comment about which systems use ushort 
sin_family
......................................................................

test_pkt: Correct comment about which systems use ushort sin_family

I found out due to an unrelated problem that the comment
is wrong. So let's fix it before it confuses the next
person.

Change-Id: Ib99618742929fd96562884d071f3bedc5ca309e4
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M tests/unit_tests/openvpn/test_pkt.c
1 file changed, 5 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/2025/1

diff --git a/tests/unit_tests/openvpn/test_pkt.c 
b/tests/unit_tests/openvpn/test_pkt.c
index 51c73d8..fbbb40f 100644
--- a/tests/unit_tests/openvpn/test_pkt.c
+++ b/tests/unit_tests/openvpn/test_pkt.c
@@ -579,13 +579,14 @@

     struct session_id expected_server_id = { { 0xec, 0xa3, 0xd5, 0xcc, 0xb4, 
0x7c, 0xa1, 0xee } };
     /* We have to deal with different structs here annoyingly */
-    /* Linux has an unsigned short int as family_t and this is field is always
+    /* Some systems have an unsigned short int as family_t and the field is 
always
      * stored in host endianness even though the rest of the struct isn't...,
-     * so Linux little endian differs from all BSD and Linux big endian */
+     * This affects at least Linux, Windows, and OpenIndiana.
+     */
     if (sizeof(addr.addr.in4.sin_family) == sizeof(unsigned short int) && 
ntohs(AF_INET) != AF_INET)
     {
-        struct session_id linuxle = { { 0x70, 0x04, 0x8c, 0x0f, 0xfe, 0x30, 
0x85, 0x12 } };
-        expected_server_id = linuxle;
+        struct session_id short_le = { { 0x70, 0x04, 0x8c, 0x0f, 0xfe, 0x30, 
0x85, 0x12 } };
+        expected_server_id = short_le;
     }
     assert_memory_equal(expected_server_id.id, server_id.id, SID_SIZE);


--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2025?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: Ib99618742929fd96562884d071f3bedc5ca309e4
Gerrit-Change-Number: 2025
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Lichtenheld <[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