Module Name: src
Committed By: tteras
Date: Thu Feb 10 11:21:55 UTC 2011
Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
prsa_par.y
Log Message:
>From Mats Erik Andersson <[email protected]>: Fix address
initialization of restricted RSA keys to work on non-linux platforms.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 \
src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y
diff -u src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y:1.4 src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y:1.4.6.1
--- src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y:1.4 Sat Sep 9 16:22:10 2006
+++ src/crypto/dist/ipsec-tools/src/racoon/prsa_par.y Thu Feb 10 11:21:55 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: prsa_par.y,v 1.4 2006/09/09 16:22:10 manu Exp $ */
+/* $NetBSD: prsa_par.y,v 1.4.6.1 2011/02/10 11:21:55 tteras Exp $ */
/* Id: prsa_par.y,v 1.3 2004/11/08 12:04:23 ludvigm Exp */
@@ -246,6 +246,9 @@
$$->prefix = $2;
sap = (struct sockaddr_in *)(&$$->sa);
sap->sin_family = AF_INET;
+#ifndef __linux__
+ sap->sin_len = sizeof(*sap);
+#endif
err = inet_pton(AF_INET, $1, (struct in_addr*)(&sap->sin_addr));
if (err <= 0) {
prsaerror("inet_pton(%s): %s\n", $1, strerror(errno));
@@ -269,6 +272,9 @@
$$->prefix = $2;
sap = (struct sockaddr_in6 *)(&$$->sa);
sap->sin6_family = AF_INET6;
+#ifndef __linux__
+ sap->sin6_len = sizeof(*sap);
+#endif
err = inet_pton(AF_INET6, $1, (struct in6_addr*)(&sap->sin6_addr));
if (err <= 0) {
prsaerror("inet_pton(%s): %s\n", $1, strerror(errno));