summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>2002-10-30 08:32:19 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>2002-10-30 08:32:19 +0000
commit30613f5610e0139db5eb53407ac7f628ccb141d5 (patch)
tree1e26aadedf87d2089423d3b65fabf84837213f44
parent5d3590aed7136fc23d5c03575f82f88990e82920 (diff)
Notes
-rw-r--r--sys/netinet/tcp_input.c21
-rw-r--r--sys/netinet/tcp_reass.c21
2 files changed, 16 insertions, 26 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 7849ea0d2ef1..6175a81a9392 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -525,8 +525,8 @@ tcp_input(m, off0)
/*
* Locate pcb for segment.
*/
- INP_INFO_WLOCK(&tcbinfo);
- headlocked = 1;
+ INP_INFO_WLOCK(&tcbinfo);
+ headlocked = 1;
findpcb:
/* IPFIREWALL_FORWARD section */
if (next_hop != NULL && isipv6 == 0) { /* IPv6 support is not yet */
@@ -574,14 +574,11 @@ findpcb:
}
#endif
#ifdef FAST_IPSEC
-#ifdef INET6
if (isipv6) {
if (inp != NULL && ipsec6_in_reject(m, inp)) {
goto drop;
}
- } else
-#endif /* INET6 */
- if (inp != NULL && ipsec4_in_reject(m, inp)) {
+ } else if (inp != NULL && ipsec4_in_reject(m, inp)) {
goto drop;
}
#endif /*FAST_IPSEC*/
@@ -2053,13 +2050,11 @@ step6:
* but if two URG's are pending at once, some out-of-band
* data may creep in... ick.
*/
- if (th->th_urp <= (u_long)tlen
-#ifdef SO_OOBINLINE
- && (so->so_options & SO_OOBINLINE) == 0
-#endif
- )
- tcp_pulloutofband(so, th, m,
- drop_hdrlen); /* hdr drop is delayed */
+ if (th->th_urp <= (u_long)tlen &&
+ !(so->so_options & SO_OOBINLINE)) {
+ /* hdr drop is delayed */
+ tcp_pulloutofband(so, th, m, drop_hdrlen);
+ }
} else {
/*
* If no out of band data is expected,
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 7849ea0d2ef1..6175a81a9392 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -525,8 +525,8 @@ tcp_input(m, off0)
/*
* Locate pcb for segment.
*/
- INP_INFO_WLOCK(&tcbinfo);
- headlocked = 1;
+ INP_INFO_WLOCK(&tcbinfo);
+ headlocked = 1;
findpcb:
/* IPFIREWALL_FORWARD section */
if (next_hop != NULL && isipv6 == 0) { /* IPv6 support is not yet */
@@ -574,14 +574,11 @@ findpcb:
}
#endif
#ifdef FAST_IPSEC
-#ifdef INET6
if (isipv6) {
if (inp != NULL && ipsec6_in_reject(m, inp)) {
goto drop;
}
- } else
-#endif /* INET6 */
- if (inp != NULL && ipsec4_in_reject(m, inp)) {
+ } else if (inp != NULL && ipsec4_in_reject(m, inp)) {
goto drop;
}
#endif /*FAST_IPSEC*/
@@ -2053,13 +2050,11 @@ step6:
* but if two URG's are pending at once, some out-of-band
* data may creep in... ick.
*/
- if (th->th_urp <= (u_long)tlen
-#ifdef SO_OOBINLINE
- && (so->so_options & SO_OOBINLINE) == 0
-#endif
- )
- tcp_pulloutofband(so, th, m,
- drop_hdrlen); /* hdr drop is delayed */
+ if (th->th_urp <= (u_long)tlen &&
+ !(so->so_options & SO_OOBINLINE)) {
+ /* hdr drop is delayed */
+ tcp_pulloutofband(so, th, m, drop_hdrlen);
+ }
} else {
/*
* If no out of band data is expected,