ref: 52f38135b6aaad483aff7cb3218c881a164c2b5d
parent: 971569616d09bee794c9377c58a3fe48ad2467a6
	author: cinap_lenrek <cinap_lenrek@felloff.net>
	date: Mon Dec 18 15:47:55 EST 2017
	
devether: dont forward loopback packets on bridges
--- a/sys/src/9/kw/devether.c
+++ b/sys/src/9/kw/devether.c
@@ -177,8 +177,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/mtx/devether.c
+++ b/sys/src/9/mtx/devether.c
@@ -169,8 +169,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/omap/devether.c
+++ b/sys/src/9/omap/devether.c
@@ -176,8 +176,8 @@
 	for(fp = ether->f; fp < ep; fp++){if((f = *fp) != nil && (f->type == type || f->type < 0) &&
 		    (tome || multi || f->prom)){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/pc/devether.c
+++ b/sys/src/9/pc/devether.c
@@ -175,8 +175,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/ppc/devether.c
+++ b/sys/src/9/ppc/devether.c
@@ -170,8 +170,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/sgi/devether.c
+++ b/sys/src/9/sgi/devether.c
@@ -175,8 +175,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/teg2/devether.c
+++ b/sys/src/9/teg2/devether.c
@@ -174,8 +174,8 @@
 	for(fp = ether->f; fp < ep; fp++){if((f = *fp) != nil && (f->type == type || f->type < 0) &&
 		    (tome || multi || f->prom)){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--- a/sys/src/9/zynq/devether.c
+++ b/sys/src/9/zynq/devether.c
@@ -175,8 +175,8 @@
if(f = *fp)
if(f->type == type || f->type < 0)
 		if(tome || multi || f->prom){- /* Don't want to hear bridged packets */
- if(f->bridge && !fromwire && !fromme)
+ /* Don't want to hear loopback or bridged packets */
+ if(f->bridge && (tome || !fromwire && !fromme))
continue;
 			if(!f->headersonly){if(fromwire && fx == 0)
--
⑨