devip: handle ignoreadvice flag for all protocols
This commit is contained in:
parent
090a404732
commit
8f2d9a139f
6 changed files with 11 additions and 1 deletions
|
@ -595,7 +595,7 @@ espadvise(Proto *esp, Block *bp, char *msg)
|
||||||
|
|
||||||
qlock(esp);
|
qlock(esp);
|
||||||
c = convlookup(esp, vers.spi);
|
c = convlookup(esp, vers.spi);
|
||||||
if(c != nil) {
|
if(c != nil && !c->ignoreadvice) {
|
||||||
qhangup(c->rq, msg);
|
qhangup(c->rq, msg);
|
||||||
qhangup(c->wq, msg);
|
qhangup(c->wq, msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,6 +449,8 @@ icmpadvise(Proto *icmp, Block *bp, char *msg)
|
||||||
s = *c;
|
s = *c;
|
||||||
if(s->lport == recid)
|
if(s->lport == recid)
|
||||||
if(ipcmp(s->raddr, dst) == 0){
|
if(ipcmp(s->raddr, dst) == 0){
|
||||||
|
if(s->ignoreadvice)
|
||||||
|
break;
|
||||||
qhangup(s->rq, msg);
|
qhangup(s->rq, msg);
|
||||||
qhangup(s->wq, msg);
|
qhangup(s->wq, msg);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -224,6 +224,8 @@ icmpadvise6(Proto *icmp, Block *bp, char *msg)
|
||||||
for(c = icmp->conv; *c; c++) {
|
for(c = icmp->conv; *c; c++) {
|
||||||
s = *c;
|
s = *c;
|
||||||
if(s->lport == recid && ipcmp(s->raddr, p->dst) == 0){
|
if(s->lport == recid && ipcmp(s->raddr, p->dst) == 0){
|
||||||
|
if(s->ignoreadvice)
|
||||||
|
break;
|
||||||
qhangup(s->rq, msg);
|
qhangup(s->rq, msg);
|
||||||
qhangup(s->wq, msg);
|
qhangup(s->wq, msg);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1334,6 +1334,8 @@ iladvise(Proto *il, Block *bp, char *msg)
|
||||||
if(s->lport == psource)
|
if(s->lport == psource)
|
||||||
if(ipcmp(s->laddr, source) == 0)
|
if(ipcmp(s->laddr, source) == 0)
|
||||||
if(ipcmp(s->raddr, dest) == 0){
|
if(ipcmp(s->raddr, dest) == 0){
|
||||||
|
if(s->ignoreadvice)
|
||||||
|
break;
|
||||||
qunlock(il);
|
qunlock(il);
|
||||||
ic = (Ilcb*)s->ptcl;
|
ic = (Ilcb*)s->ptcl;
|
||||||
switch(ic->state){
|
switch(ic->state){
|
||||||
|
|
|
@ -648,6 +648,8 @@ rudpadvise(Proto *rudp, Block *bp, char *msg)
|
||||||
if(s->lport == psource)
|
if(s->lport == psource)
|
||||||
if(ipcmp(s->raddr, dest) == 0)
|
if(ipcmp(s->raddr, dest) == 0)
|
||||||
if(ipcmp(s->laddr, source) == 0){
|
if(ipcmp(s->laddr, source) == 0){
|
||||||
|
if(s->ignoreadvice)
|
||||||
|
break;
|
||||||
qhangup(s->rq, msg);
|
qhangup(s->rq, msg);
|
||||||
qhangup(s->wq, msg);
|
qhangup(s->wq, msg);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3254,6 +3254,8 @@ tcpadvise(Proto *tcp, Block *bp, char *msg)
|
||||||
if(tcb->state != Closed)
|
if(tcb->state != Closed)
|
||||||
if(ipcmp(s->raddr, dest) == 0)
|
if(ipcmp(s->raddr, dest) == 0)
|
||||||
if(ipcmp(s->laddr, source) == 0){
|
if(ipcmp(s->laddr, source) == 0){
|
||||||
|
if(s->ignoreadvice)
|
||||||
|
break;
|
||||||
qlock(s);
|
qlock(s);
|
||||||
qunlock(tcp);
|
qunlock(tcp);
|
||||||
switch(tcb->state){
|
switch(tcb->state){
|
||||||
|
|
Loading…
Reference in a new issue