Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net From Coyote Point source tree: "fix" srt IPv4 lookup...
details: https://anonhg.NetBSD.org/src/rev/c9d81b898288
branches: trunk
changeset: 757640:c9d81b898288
user: tls <tls%NetBSD.org@localhost>
date: Thu Sep 09 03:24:57 2010 +0000
description:
>From Coyote Point source tree: "fix" srt IPv4 lookup on little-endian
hosts. IPv6 is probably still broken, and, actually, the lookup table
for mask values should be kept in network byte order, not host byte order
and the corresponding change to the srtconfig ioctl interface made.
But at least this works.
diffstat:
sys/net/if_srt.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r e2a7daacca08 -r c9d81b898288 sys/net/if_srt.c
--- a/sys/net/if_srt.c Thu Sep 09 01:22:10 2010 +0000
+++ b/sys/net/if_srt.c Thu Sep 09 03:24:57 2010 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: if_srt.c,v 1.14 2010/04/05 07:22:24 joerg Exp $ */
+/* $NetBSD: if_srt.c,v 1.15 2010/09/09 03:24:57 tls Exp $ */
/* This file is in the public domain. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_srt.c,v 1.14 2010/04/05 07:22:24 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_srt.c,v 1.15 2010/09/09 03:24:57 tls Exp $");
#include "opt_inet.h"
@@ -110,13 +110,13 @@
break;
}
va_end(ap);
- for (i=0;i<sc->nrt;i++) {
+ for (i=0; i < sc->nrt; i++) {
r = sc->rts[i];
if (r->af != af)
continue;
switch (af) {
case AF_INET:
- if ((ia.s_addr & ipv4_masks[r->srcmask]) ==
+ if ((ia.s_addr & htonl(ipv4_masks[r->srcmask])) ==
r->srcmatch.v4.s_addr)
return r;
break;
Home |
Main Index |
Thread Index |
Old Index