devether: dont forward loopback packets on bridges
This commit is contained in:
parent
1f80d31f41
commit
c1eb4b8d68
8 changed files with 16 additions and 16 deletions
|
@ -177,8 +177,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -169,8 +169,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -176,8 +176,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
for(fp = ether->f; fp < ep; fp++){
|
for(fp = ether->f; fp < ep; fp++){
|
||||||
if((f = *fp) != nil && (f->type == type || f->type < 0) &&
|
if((f = *fp) != nil && (f->type == type || f->type < 0) &&
|
||||||
(tome || multi || f->prom)){
|
(tome || multi || f->prom)){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -170,8 +170,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -174,8 +174,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
for(fp = ether->f; fp < ep; fp++){
|
for(fp = ether->f; fp < ep; fp++){
|
||||||
if((f = *fp) != nil && (f->type == type || f->type < 0) &&
|
if((f = *fp) != nil && (f->type == type || f->type < 0) &&
|
||||||
(tome || multi || f->prom)){
|
(tome || multi || f->prom)){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
|
@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
|
||||||
if(f = *fp)
|
if(f = *fp)
|
||||||
if(f->type == type || f->type < 0)
|
if(f->type == type || f->type < 0)
|
||||||
if(tome || multi || f->prom){
|
if(tome || multi || f->prom){
|
||||||
/* Don't want to hear bridged packets */
|
/* Don't want to hear loopback or bridged packets */
|
||||||
if(f->bridge && !fromwire && !fromme)
|
if(f->bridge && (tome || !fromwire && !fromme))
|
||||||
continue;
|
continue;
|
||||||
if(!f->headersonly){
|
if(!f->headersonly){
|
||||||
if(fromwire && fx == 0)
|
if(fromwire && fx == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue