Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#16392 closed defect (fixed)

vtun 3.0.2 patch fix

Reported by: emertens@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port: vtun

Description (last modified by jmroot (Joshua Root))

The patch included in vtun 3.0.2 needs to be updated to the following (the change is the md5.h line). This is required to build.

--- lfd_legacy_encrypt.c    2008-07-09 16:06:01.000000000 -0400
+++ lfd_legacy_encrypt.c    2008-07-09 16:07:06.000000000 -0400
@@ -55,7 +55,7 @@
 #include <openssl/blowfish.h>
 #else /* YAY - We're MAC OS */
-#include <sys/md5.h>
-#include <crypto/blowfish.h>
+#include <openssl/md5.h>
+#include <openssl/blowfish.h>
 #endif  /* __APPLE_CC__ */

 #define ENC_BUF_SIZE VTUN_FRAME_SIZE + 16

Change History (8)

comment:1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Milestone: Port Bugs

Let me make sure I understand.

As shipped, vtun 3.0.2 has this set of definitions in lfd_legacy_encrypt.c:

#ifndef __APPLE_CC__
/* OpenSSL includes */
#include <openssl/md5.h>
#include <openssl/blowfish.h>
#else /* YAY - We're MAC OS */
#include <sys/md5.h>
#include <crypto/blowfish.h>
#endif  /* __APPLE_CC__ */

In other words, on non-Mac OS X systems, it uses OpenSSL includes for md5 and blowfish, and on Mac OS X it uses includes built into the operating system.

The vtun 3.0.2_0 port has a patch which makes the software always use the OpenSSL blowfish include, even on Mac OS X. I do not know why this was done; it has been there since the port was initially added in r6236.

Now you are proposing that the md5 include should also be taken from OpenSSL, even on Mac OS X, effectively reducing the above definitions to this:

/* OpenSSL includes */
#include <openssl/md5.h>
#include <openssl/blowfish.h>

You have filed this ticket as a defect. What problem are you observing as a result of these includes -- or, if not a problem, what is gained by changing the includes? How can I reproduce the issue on my system so that I can confirm that your change is the correct fix? The port builds fine for me with or without your change, on Mac OS X 10.4.11 on Intel with Xcode 2.5. What version of Mac OS X and Xcode do you have, and on which processor architecture?

comment:2 Changed 16 years ago by emertens@…

My change was required to build this port on OS X 10.5 on x86

comment:3 Changed 16 years ago by emertens@…

My change was required to build this port on OS X 10.5 on x86 with XCode 3.1

comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ticketformatting added

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

Ok, yes, I see, on Mac OS X 10.5.4 with Xcode 3.1 on a Power Mac G4 I get

/usr/bin/gcc-4.0 -O2 -I/mp/include -I/mp/include -I/usr/include/openssl -I/usr/include/openssl -I/usr/include/openssl -I/usr/include/openssl -DVTUN_CONFIG_FILE=\"/mp/etc/vtund.conf\" -DVTUN_PID_FILE=\"/mp/var/run/vtund.pid\" -DVTUN_STAT_DIR=\"/mp/var/log/vtund\" -DVTUN_LOCK_DIR=\"/mp/var/lock/vtund\" -c lfd_legacy_encrypt.c
lfd_legacy_encrypt.c:57:21: error: sys/md5.h: No such file or directory

Now let me try it with the patch.

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Yup, patch fixes it. Applied a fix in r39861. Thanks!

comment:7 Changed 16 years ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: ticketformatting removed
Port: vtun added

comment:8 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.