along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_packet.c,v 1.1.2.9 2002/03/12 14:19:51 guus Exp $
+ $Id: net_packet.c,v 1.1.2.10 2002/03/17 15:59:29 guus Exp $
*/
#include "config.h"
return;
}
+ sockaddrunmap(&from); /* Some braindead IPv6 implementations do stupid things. */
+
n = lookup_node_udp(&from);
if(!n)
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_socket.c,v 1.1.2.8 2002/03/01 15:14:29 guus Exp $
+ $Id: net_socket.c,v 1.1.2.9 2002/03/17 15:59:29 guus Exp $
*/
#include "config.h"
return -1;
}
+ sockaddrunmap(&sa);
+
c = new_connection();
c->outcipher = myself->connection->outcipher;
c->outdigest = myself->connection->outdigest;
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: netutl.c,v 1.12.4.28 2002/02/26 22:47:51 guus Exp $
+ $Id: netutl.c,v 1.12.4.29 2002/03/17 15:59:29 guus Exp $
*/
#include "config.h"
cp
}
+void sockaddrunmap(sockaddr_t *sa)
+{
+ if(IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr))
+ {
+ sa->in.sin_addr.s_addr = sa->in6.sin6_addr.s6_addr32[3];
+ sa->in.sin_family = AF_INET;
+ }
+}
+
/* Subnet mask handling */
int maskcmp(char *a, char *b, int masklen, int len)
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: netutl.h,v 1.2.4.10 2002/02/18 16:25:16 guus Exp $
+ $Id: netutl.h,v 1.2.4.11 2002/03/17 15:59:29 guus Exp $
*/
#ifndef __TINC_NETUTL_H__
extern void sockaddr2str(sockaddr_t *, char **, char **);
extern char *sockaddr2hostname(sockaddr_t *);
extern int sockaddrcmp(sockaddr_t *, sockaddr_t *);
+extern void sockaddrunmap(sockaddr_t *);
extern int maskcmp(char *, char *, int, int);
extern void maskcpy(char *, char *, int, int);
extern void mask(char *, int, int);