History log of /netbsd-src/sys/netinet/tcp_input.c (Results 26 – 50 of 441)
Revision Date Author Comments
# 71f9a826 25-Sep-2019 jnemeth <jnemeth@NetBSD.org>

PR/54572 - Edgar Fuß -- error in comment


# 4952945b 06-Aug-2019 riastradh <riastradh@NetBSD.org>

Clamp tcp timer quantities to reasonable ranges.

Reported-by: syzbot+259675123340bf46a6de@syzkaller.appspotmail.com


# 0b2371a5 01-Jun-2019 kamil <kamil@NetBSD.org>

Replace potentially misaligned pointer dereference + htonl() with be32dec()

Reported by kUBSan.


# 169880b3 08-Nov-2018 msaitoh <msaitoh@NetBSD.org>

"s/ an an / an /" in comment. No functional change.


# 15652348 14-Sep-2018 maxv <maxv@NetBSD.org>

Use non-variadic function pointer in protosw::pr_input.


# a3561c20 14-Sep-2018 maxv <maxv@NetBSD.org>

rename toff -> off


# c5e96a3f 14-Sep-2018 maxv <maxv@NetBSD.org>

rename off -> thlen


# d1579b2d 03-Sep-2018 riastradh <riastradh@NetBSD.org>

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a n

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)

show more ...


# a1d8c752 18-May-2018 maxv <maxv@NetBSD.org>

IP6_EXTHDR_GET -> M_REGION_GET, no functional change.


# 5d73803e 03-May-2018 maxv <maxv@NetBSD.org>

Remove now unused tcpip.h includes. Some were already unused before.


# 2489795f 28-Apr-2018 maxv <maxv@NetBSD.org>

Remove unused ipsec_var.h includes.


# 95ba030c 08-Apr-2018 maxv <maxv@NetBSD.org>

Remove the ipre_mlast field and the TRAVERSE macro.

The goal was to store in ipre_mlast the last mbuf of the chain, so that
m_cat could be called on it. But it's not needed, since m_cat already
does

Remove the ipre_mlast field and the TRAVERSE macro.

The goal was to store in ipre_mlast the last mbuf of the chain, so that
m_cat could be called on it. But it's not needed, since m_cat already
does the equivalent of TRAVERSE itself.

If it were needed, there would be a bug, since we don't call TRAVERSE on
ipre_mlast when creating a new reassembly entry.

show more ...


# d40270d9 03-Apr-2018 maxv <maxv@NetBSD.org>

Remove ipsec_copy_policy and ipsec_copy_pcbpolicy. No functional change,
since we used only ipsec_copy_pcbpolicy, and it was a no-op.

Originally we were using ipsec_copy_policy to optimize the IPsec

Remove ipsec_copy_policy and ipsec_copy_pcbpolicy. No functional change,
since we used only ipsec_copy_pcbpolicy, and it was a no-op.

Originally we were using ipsec_copy_policy to optimize the IPsec-PCB
cache: when an ACK was received in response to a SYN, we used to copy the
SP cached in the SYN's PCB into the ACK's PCB, so that
ipsec_getpolicybysock could use the cached SP instead of requerying it.

Then we switched to ipsec_copy_pcbpolicy which has always been a no-op. As
a result the SP cached in the SYN was/is not copied in the ACK, and the
first call to ipsec_getpolicybysock had to query the SP and cache it
itself. It's not totally clear to me why this change was made.

But it has been this way for years, and after a conversation with Ryota
Ozaki it turns out the optimization is not valid anymore due to
MP-ification, so it won't be re-enabled.

ok ozaki-r@

show more ...


# 479f3edb 30-Mar-2018 maxv <maxv@NetBSD.org>

Fix the log. mtod never returns NULL, so 'ip' is always non-NULL, and the
'ip6' branch is never taken. As a result we log garbage on IPv6 packets.

Use ip_v instead.


# bb11bbb4 30-Mar-2018 maxv <maxv@NetBSD.org>

Use consttime_memequal instead of memcmp, to prevent side channels. This
functions returns 1 when the buffers are equal, contrary to memcmp, hence
the !.


# 7d427053 29-Mar-2018 rmind <rmind@NetBSD.org>

tcp_urp_drop: fix a bug introduced in 1.390 rev (hi maxv@).


# c2ea7669 29-Mar-2018 maxv <maxv@NetBSD.org>

Remove TCPREASS_DEBUG. It was introduced 20 years ago when the reassembler
was being developed, but it's irrelevant today. Makes the code clearer.


# 8e8bd5fe 29-Mar-2018 maxv <maxv@NetBSD.org>

Reorder/Fix comments to clarify.


# 0ec7f434 29-Mar-2018 maxv <maxv@NetBSD.org>

Remove two more 'else' branches.


# 7e2cb8fd 29-Mar-2018 maxv <maxv@NetBSD.org>

Fix memory leak, we may reallocate 'tcp_saveti' after 'findpcb'. It's not
a tragic bug, because it happens only on sockets with debug enabled.


# 6ad7e2c6 29-Mar-2018 maxv <maxv@NetBSD.org>

Remove 'else', makes it clearer that we leave.


# 1aae7eaf 29-Mar-2018 maxv <maxv@NetBSD.org>

Clarify with KASSERT.


# 749f228d 29-Mar-2018 maxv <maxv@NetBSD.org>

Simplify the computation:

m->m_pkthdr.len - sizeof(struct tcphdr) - optlen - hlen
= m->m_pkthdr.len - (sizeof(struct tcphdr) + optlen + hlen)
= m->m_pkthdr.len - [tcp_len]
= toff


# 4cd157e5 28-Mar-2018 maxv <maxv@NetBSD.org>

Several changes in syn_cache_respond:

* Replace idiotic diagnostic check by KASSERT. max_linkhdr+tlen<=MCLBYTES
is a widespread assumption.

* Improve initialization of 'tp'.

* Put panics in

Several changes in syn_cache_respond:

* Replace idiotic diagnostic check by KASSERT. max_linkhdr+tlen<=MCLBYTES
is a widespread assumption.

* Improve initialization of 'tp'.

* Put panics in dead branches.

* Merge two switches.

show more ...


# 9af44f3a 28-Mar-2018 maxv <maxv@NetBSD.org>

Remove unused variable.


12345678910>>...18