On 15/11/16(Tue) 16:36, Alexander Bluhm wrote: > [...] > You are a bit inconsistent wether you remove the {} from one line > if blocks.
That should fix my inconsistencies. Index: netinet/tcp_input.c =================================================================== RCS file: /cvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.332 diff -u -p -r1.332 tcp_input.c --- netinet/tcp_input.c 16 Nov 2016 08:50:32 -0000 1.332 +++ netinet/tcp_input.c 16 Nov 2016 08:57:03 -0000 @@ -3678,10 +3678,9 @@ syn_cache_get(struct sockaddr *src, stru splsoftassert(IPL_SOFTNET); - if ((sc = syn_cache_lookup(src, dst, &scp, - sotoinpcb(so)->inp_rtableid)) == NULL) { + sc = syn_cache_lookup(src, dst, &scp, sotoinpcb(so)->inp_rtableid); + if (sc == NULL) return (NULL); - } /* * Verify the sequence and ack numbers. Try getting the correct @@ -3910,9 +3909,8 @@ syn_cache_reset(struct sockaddr *src, st if ((sc = syn_cache_lookup(src, dst, &scp, rtableid)) == NULL) return; if (SEQ_LT(th->th_seq, sc->sc_irs) || - SEQ_GT(th->th_seq, sc->sc_irs+1)) { + SEQ_GT(th->th_seq, sc->sc_irs + 1)) return; - } syn_cache_rm(sc); tcpstat.tcps_sc_reset++; syn_cache_put(sc); @@ -3927,9 +3925,8 @@ syn_cache_unreach(struct sockaddr *src, splsoftassert(IPL_SOFTNET); - if ((sc = syn_cache_lookup(src, dst, &scp, rtableid)) == NULL) { + if ((sc = syn_cache_lookup(src, dst, &scp, rtableid)) == NULL) return; - } /* If the sequence number != sc_iss, then it's a bogus ICMP msg */ if (ntohl (th->th_seq) != sc->sc_iss) { return; @@ -4030,8 +4027,8 @@ syn_cache_add(struct sockaddr *src, stru * If we do, resend the SYN,ACK. We do not count this * as a retransmission (XXX though maybe we should). */ - if ((sc = syn_cache_lookup(src, dst, &scp, sotoinpcb(so)->inp_rtableid)) - != NULL) { + sc = syn_cache_lookup(src, dst, &scp, sotoinpcb(so)->inp_rtableid); + if (sc != NULL) { tcpstat.tcps_sc_dupesyn++; if (ipopts) { /*