devether: dont forward loopback packets on bridges

This commit is contained in:
cinap_lenrek 2017-12-18 20:47:55 +01:00
parent 1f80d31f41
commit c1eb4b8d68
8 changed files with 16 additions and 16 deletions

View file

@ -177,8 +177,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -169,8 +169,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -176,8 +176,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -170,8 +170,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -174,8 +174,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)

View file

@ -175,8 +175,8 @@ etheriq(Ether* ether, Block* bp, int fromwire)
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)