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->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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue