Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177565708
D59142.1794750117.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D59142.1794750117.diff
View Options
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -596,7 +596,7 @@
int
tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port)
{
- struct mbuf *m = *mp;
+ struct mbuf *m;
struct tcphdr *th = NULL;
struct ip *ip = NULL;
struct inpcb *inp = NULL;
@@ -617,7 +617,7 @@
struct m_tag *fwd_tag = NULL;
#ifdef INET6
struct ip6_hdr *ip6 = NULL;
- int isipv6;
+ bool isipv6;
#else
const void *ip6 = NULL;
#endif /* INET6 */
@@ -627,10 +627,6 @@
NET_EPOCH_ASSERT();
-#ifdef INET6
- isipv6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0;
-#endif
-
off0 = *offp;
m = *mp;
*mp = NULL;
@@ -639,6 +635,7 @@
m->m_pkthdr.tcp_tun_port = port;
#ifdef INET6
+ isipv6 = mtod(m, struct ip *)->ip_v == 6;
if (isipv6) {
ip6 = mtod(m, struct ip6_hdr *);
th = (struct tcphdr *)((caddr_t)ip6 + off0);
@@ -777,9 +774,9 @@
TCPSTAT_INC(tcps_rcvshort);
return (IPPROTO_DONE);
}
+ ip6 = mtod(m, struct ip6_hdr *);
+ th = (struct tcphdr *)((caddr_t)ip6 + off0);
}
- ip6 = mtod(m, struct ip6_hdr *);
- th = (struct tcphdr *)((caddr_t)ip6 + off0);
}
#endif
#if defined(INET) && defined(INET6)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 1:41 PM (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37226209
Default Alt Text
D59142.1794750117.diff (1 KB)
Attached To
Mode
D59142: tcp: minor cleanup
Attached
Detach File
Event Timeline