devip: cleanup tcp.c
parent
c5c613357e
commit
9860172fce
|
@ -3229,8 +3229,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg)
|
||||||
v4tov6(source, h4->tcpsrc);
|
v4tov6(source, h4->tcpsrc);
|
||||||
psource = nhgets(h4->tcpsport);
|
psource = nhgets(h4->tcpsport);
|
||||||
pdest = nhgets(h4->tcpdport);
|
pdest = nhgets(h4->tcpdport);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ipmove(dest, h6->tcpdst);
|
ipmove(dest, h6->tcpdst);
|
||||||
ipmove(source, h6->tcpsrc);
|
ipmove(source, h6->tcpsrc);
|
||||||
psource = nhgets(h6->tcpsport);
|
psource = nhgets(h6->tcpsport);
|
||||||
|
@ -3239,8 +3238,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg)
|
||||||
|
|
||||||
/* Look for a connection */
|
/* Look for a connection */
|
||||||
qlock(tcp);
|
qlock(tcp);
|
||||||
for(p = tcp->conv; *p; p++) {
|
for(p = tcp->conv; (s = *p) != nil; p++) {
|
||||||
s = *p;
|
|
||||||
tcb = (Tcpctl*)s->ptcl;
|
tcb = (Tcpctl*)s->ptcl;
|
||||||
if(s->rport == pdest)
|
if(s->rport == pdest)
|
||||||
if(s->lport == psource)
|
if(s->lport == psource)
|
||||||
|
|
Loading…
Reference in New Issue