Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net bridge: reject non-IFF_SIMPLEX interfaces
details: https://anonhg.NetBSD.org/src/rev/58ef55f7ecdc
branches: trunk
changeset: 331595:58ef55f7ecdc
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Aug 15 15:32:24 2014 +0000
description:
bridge: reject non-IFF_SIMPLEX interfaces
bridge does not work with !IFF_SIMPLEX interfaces (PR/18035);
the bug is not yet fixed. Until it gets fixed, we should
reject non-IFF_SIMPLEX interfaces.
Discussed with pooka@
diffstat:
sys/net/if_bridge.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r e420625b379d -r 58ef55f7ecdc sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Fri Aug 15 15:04:33 2014 +0000
+++ b/sys/net/if_bridge.c Fri Aug 15 15:32:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.90 2014/07/23 05:32:23 ozaki-r Exp $ */
+/* $NetBSD: if_bridge.c,v 1.91 2014/08/15 15:32:24 ozaki-r Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.90 2014/07/23 05:32:23 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.91 2014/08/15 15:32:24 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -800,6 +800,10 @@
if (ifs->if_input != ether_input)
return EINVAL;
+ /* FIXME: doesn't work with non-IFF_SIMPLEX interfaces */
+ if ((ifs->if_flags & IFF_SIMPLEX) == 0)
+ return EINVAL;
+
bif = malloc(sizeof(*bif), M_DEVBUF, M_NOWAIT);
if (bif == NULL)
return (ENOMEM);
Home |
Main Index |
Thread Index |
Old Index