Module Name: src
Committed By: pooka
Date: Fri Mar 11 12:11:01 UTC 2011
Modified Files:
src/sys/rump/net/lib/libshmif: if_shmem.c
Log Message:
make the if-else logic more obvious
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/net/lib/libshmif/if_shmem.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/net/lib/libshmif/if_shmem.c
diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.37 src/sys/rump/net/lib/libshmif/if_shmem.c:1.38
--- src/sys/rump/net/lib/libshmif/if_shmem.c:1.37 Fri Mar 11 12:10:15 2011
+++ src/sys/rump/net/lib/libshmif/if_shmem.c Fri Mar 11 12:11:00 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.37 2011/03/11 12:10:15 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.38 2011/03/11 12:11:00 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.37 2011/03/11 12:10:15 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.38 2011/03/11 12:11:00 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -707,7 +707,6 @@
/*
* Test if we want to pass the packet upwards
*/
- passup = false;
eth = mtod(m, struct ether_header *);
if (memcmp(eth->ether_dhost, CLLADDR(ifp->if_sadl),
ETHER_ADDR_LEN) == 0) {
@@ -718,6 +717,8 @@
} else if (ifp->if_flags & IFF_PROMISC) {
m->m_flags |= M_PROMISC;
passup = true;
+ } else {
+ passup = false;
}
if (passup) {