ref: 8f2d9a139fa48e964e46be4bc8b7b451a0a721c9
parent: 090a40473261a31a5bd0b08976b39cb4ee09bdc9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 12 18:07:58 EST 2016
devip: handle ignoreadvice flag for all protocols
--- a/sys/src/9/ip/esp.c
+++ b/sys/src/9/ip/esp.c
@@ -595,7 +595,7 @@
qlock(esp);
c = convlookup(esp, vers.spi);
- if(c != nil) {
+ if(c != nil && !c->ignoreadvice) {
qhangup(c->rq, msg);
qhangup(c->wq, msg);
}
--- a/sys/src/9/ip/icmp.c
+++ b/sys/src/9/ip/icmp.c
@@ -449,6 +449,8 @@
s = *c;
if(s->lport == recid)
if(ipcmp(s->raddr, dst) == 0){
+ if(s->ignoreadvice)
+ break;
qhangup(s->rq, msg);
qhangup(s->wq, msg);
break;
--- a/sys/src/9/ip/icmp6.c
+++ b/sys/src/9/ip/icmp6.c
@@ -224,6 +224,8 @@
for(c = icmp->conv; *c; c++) {
s = *c;
if(s->lport == recid && ipcmp(s->raddr, p->dst) == 0){
+ if(s->ignoreadvice)
+ break;
qhangup(s->rq, msg);
qhangup(s->wq, msg);
break;
--- a/sys/src/9/ip/il.c
+++ b/sys/src/9/ip/il.c
@@ -1334,6 +1334,8 @@
if(s->lport == psource)
if(ipcmp(s->laddr, source) == 0)
if(ipcmp(s->raddr, dest) == 0){
+ if(s->ignoreadvice)
+ break;
qunlock(il);
ic = (Ilcb*)s->ptcl;
switch(ic->state){
--- a/sys/src/9/ip/rudp.c
+++ b/sys/src/9/ip/rudp.c
@@ -648,6 +648,8 @@
if(s->lport == psource)
if(ipcmp(s->raddr, dest) == 0)
if(ipcmp(s->laddr, source) == 0){
+ if(s->ignoreadvice)
+ break;
qhangup(s->rq, msg);
qhangup(s->wq, msg);
break;
--- a/sys/src/9/ip/tcp.c
+++ b/sys/src/9/ip/tcp.c
@@ -3254,6 +3254,8 @@
if(tcb->state != Closed)
if(ipcmp(s->raddr, dest) == 0)
if(ipcmp(s->laddr, source) == 0){
+ if(s->ignoreadvice)
+ break;
qlock(s);
qunlock(tcp);
switch(tcb->state){