devip: cleanup tcp.c

front
cinap_lenrek 2018-04-22 18:48:32 +02:00
parent c5c613357e
commit 9860172fce
1 changed files with 2 additions and 4 deletions

View File

@ -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)