diff --git a/sys/modules/tcp/Makefile b/sys/modules/tcp/Makefile --- a/sys/modules/tcp/Makefile +++ b/sys/modules/tcp/Makefile @@ -9,16 +9,13 @@ ${_tcp_rack} \ ${_tcpmd5} \ -.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) -_tcp_bbr= bbr -_tcp_rack= rack -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) .if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MTCP_SIGNATURE} _tcpmd5= tcpmd5 .endif +_tcp_bbr= bbr +_tcp_rack= rack .endif .include diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -14733,6 +14733,7 @@ tcp_lro_reg_mbufq(); bbr_mod_inited = true; printf(__XSTRING(MODNAME) " is now available\n"); + printf("WARNING: "__XSTRING(MODNAME) " is deprecated!\n"); break; case MOD_QUIESCE: err = deregister_tcp_functions(&__tcp_bbr, true, false); diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12347,6 +12347,7 @@ ip6, rack->r_ctl.fsb.th); } else #endif /* INET6 */ +#ifdef INET { rack->r_ctl.fsb.tcp_ip_hdr_len = sizeof(struct tcpiphdr); ip = (struct ip *)rack->r_ctl.fsb.tcp_ip_hdr; @@ -12366,6 +12367,7 @@ tp->t_port, ip, rack->r_ctl.fsb.th); } +#endif rack->r_fsb_inited = 1; } @@ -15611,7 +15613,7 @@ struct tcpopt to; u_char opt[TCP_MAXOLEN]; uint32_t hdrlen, optlen; - int32_t slot, segsiz, max_val, tso = 0, error, ulen = 0; + int32_t slot, segsiz, max_val, tso = 0, error = 0, ulen = 0; uint16_t flags; uint32_t if_hw_tsomaxsegcount = 0, startseq; uint32_t if_hw_tsomaxsegsize; @@ -16102,7 +16104,9 @@ * the max-burst). We have how much to send and all the info we * need to just send. */ +#ifdef INET struct ip *ip = NULL; +#endif struct udphdr *udp = NULL; struct tcphdr *th = NULL; struct mbuf *m, *s_mb; @@ -16118,7 +16122,7 @@ #ifdef TCP_ACCOUNTING int cnt_thru = 1; #endif - int32_t slot, segsiz, len, max_val, tso = 0, sb_offset, error, ulen = 0; + int32_t slot, segsiz, len, max_val, tso = 0, sb_offset, error = 0, ulen = 0; uint16_t flags; uint32_t s_soff; uint32_t if_hw_tsomaxsegcount = 0, startseq; @@ -16133,9 +16137,14 @@ } else #endif /* INET6 */ { +#ifdef INET ip = (struct ip *)rack->r_ctl.fsb.tcp_ip_hdr; hdrlen = sizeof(struct tcpiphdr); +#endif } +#if !defined(INET) && !defined(INET6) + hdrlen = 0; +#endif if (tp->t_port && (V_tcp_udp_tunneling_port == 0)) { m = NULL; goto failed; @@ -16281,8 +16290,10 @@ else #endif { +#ifdef INET ip->ip_tos &= ~IPTOS_ECN_MASK; ip->ip_tos |= ect; +#endif } } tcp_set_flags(th, flags); @@ -18346,7 +18357,9 @@ ip6 = (struct ip6_hdr *)rack->r_ctl.fsb.tcp_ip_hdr; else #endif /* INET6 */ +#ifdef INET ip = (struct ip *)rack->r_ctl.fsb.tcp_ip_hdr; +#endif th = rack->r_ctl.fsb.th; udp = rack->r_ctl.fsb.udp; if (udp) { @@ -18375,6 +18388,7 @@ } else #endif /* INET6 */ { +#ifdef INET ip = mtod(m, struct ip *); if (tp->t_port) { udp = (struct udphdr *)((caddr_t)ip + sizeof(struct ip)); @@ -18386,6 +18400,7 @@ } else th = (struct tcphdr *)(ip + 1); tcpip_fillheaders(inp, tp->t_port, ip, th); +#endif } } /* @@ -18419,8 +18434,10 @@ else #endif { +#ifdef INET ip->ip_tos &= ~IPTOS_ECN_MASK; ip->ip_tos |= ect; +#endif } } /* @@ -18514,7 +18531,9 @@ ip6 = mtod(m, struct ip6_hdr *); else #endif /* INET6 */ +#ifdef INET ip = mtod(m, struct ip *); +#endif th = (struct tcphdr *)(cpto + ((uint8_t *)rack->r_ctl.fsb.th - rack->r_ctl.fsb.tcp_ip_hdr)); /* If we have a udp header lets set it into the mbuf as well */ if (udp)