diff options
author | itojun <itojun@FreeBSD.org> | 2000-08-15 07:34:08 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 2000-08-15 07:34:08 +0000 |
commit | 7059b1cfa811f2024636d645d3fe55e4bcbfc571 (patch) | |
tree | 2049cec1d07fff8b74bdda754db948eed4fb8967 /sys/net | |
parent | 18c955d6f3131948afba4add626c43344cd2031f (diff) | |
download | FreeBSD-src-7059b1cfa811f2024636d645d3fe55e4bcbfc571.zip FreeBSD-src-7059b1cfa811f2024636d645d3fe55e4bcbfc571.tar.gz |
repair endianness issue in IN_MULTICAST().
again, *BSD difference...
From: Nick Sayer <nsayer@quack.kfu.com>
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_stf.c | 4 | ||||
-rw-r--r-- | sys/net/net_osdep.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index c95aaa5..bfd462a 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: if_stf.c,v 1.40 2000/06/20 19:44:42 itojun Exp $ */ +/* $KAME: if_stf.c,v 1.42 2000/08/15 07:24:23 itojun Exp $ */ /* * Copyright (C) 2000 WIDE Project. @@ -408,7 +408,7 @@ stf_checkaddr4(in, ifp) * reject packets with the following address: * 224.0.0.0/4 0.0.0.0/8 127.0.0.0/8 255.0.0.0/8 */ - if (IN_MULTICAST(in->s_addr)) + if (IN_MULTICAST(ntohl(in->s_addr))) return -1; switch ((ntohl(in->s_addr) & 0xff000000) >> 24) { case 0: case 127: case 255: diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h index 47f5216..fc77022 100644 --- a/sys/net/net_osdep.h +++ b/sys/net/net_osdep.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: net_osdep.h,v 1.21 2000/07/02 23:34:38 itojun Exp $ */ +/* $KAME: net_osdep.h,v 1.22 2000/08/15 07:23:10 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -150,6 +150,10 @@ * FreeBSD4: opt_{inet,inet6,ipsec,ip6fw,altq}.h * NetBSD: opt_{inet,ipsec,altq}.h * others: does not use defopt + * + * - IN_MULTICAST/IN_CLASS[A-D] macro. + * OpenBSD and NetBSD: net endian (kernel) or host endian (userland) + * others: always host endian */ #ifndef __NET_NET_OSDEP_H_DEFINED_ |