History log of /netbsd-src/sys/netinet/ip_input.c (Results 1 – 25 of 404)
Revision Date Author Comments
# 481d3881 05-Jul-2024 rin <rin@NetBSD.org>

sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Co

sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@

show more ...


# 023842dd 29-Jun-2024 riastradh <riastradh@NetBSD.org>

netinet: Use _NET_STAT* API instead of direct array access.

PR kern/58380


# 0c0a3f29 02-Sep-2022 thorpej <thorpej@NetBSD.org>

pktqueue: Re-factor sysctl handling.

Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to d

pktqueue: Re-factor sysctl handling.

Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to dynamically assign node IDs. Make
all of the sysctl handlers private to pktqueue.c, and remove the
INET- and INET6-specific pktqueue sysctl code from net/if.c.

show more ...


# aa44bcfb 08-Mar-2021 christos <christos@NetBSD.org>

remove now unused pseudo-random ip id code.


# 5d948faa 07-Mar-2021 christos <christos@NetBSD.org>

netinet: Enable random IP fragment ids by default (from riastradh)


# 2143da87 19-Feb-2021 christos <christos@NetBSD.org>

- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
correct because it works with non-primitive types and provides the ABI
alignment for the type the compiler will use.
- R

- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
correct because it works with non-primitive types and provides the ABI
alignment for the type the compiler will use.
- Remove all the *_HDR_ALIGNMENT macros and asserts
- Replace POINTER_ALIGNED_P with ACCESSIBLE_POINTER which is identical to
ALIGNED_POINTER, but returns that the pointer is always aligned if the
CPU supports unaligned accesses.
[ as proposed in tech-kern ]

show more ...


# 91838898 14-Feb-2021 christos <christos@NetBSD.org>

- centralize header align and pullup into a single inline function
- use a single macro to align pointers and expose the alignment, instead
of hard-coding 3 in 1/2 the macros.
- fix an issue in the

- centralize header align and pullup into a single inline function
- use a single macro to align pointers and expose the alignment, instead
of hard-coding 3 in 1/2 the macros.
- fix an issue in the ipv6 lt2p where it was aligning for ipv4 and pulling
for ipv6.

show more ...


# d511e529 28-Aug-2020 ozaki-r <ozaki-r@NetBSD.org>

inet: reduce silent packet discards


# 1595f749 28-Aug-2020 ozaki-r <ozaki-r@NetBSD.org>

inet: pull m_get_rcvif_psref out of ip_input for simplicity

Same as ip6_input.


# b494441d 28-Aug-2020 ozaki-r <ozaki-r@NetBSD.org>

ipsec: rename ipsec_ip_input to ipsec_ip_input_checkpolicy

Because it just checks if a packet passes security policies.


# c1e00d7d 28-Aug-2020 ozaki-r <ozaki-r@NetBSD.org>

inet, inet6: count packets dropped by IPsec

The counters count packets dropped due to security policy checks.


# a8d68489 13-Nov-2019 ozaki-r <ozaki-r@NetBSD.org>

Get rid of unnecessary NULL checks for rt_ifa and ifa_ifp

They are always non-NULL nowadays.


# 2bcf5b29 19-Sep-2019 ozaki-r <ozaki-r@NetBSD.org>

Apply some missing changes lost on the previous commit


# e524fb36 19-Sep-2019 ozaki-r <ozaki-r@NetBSD.org>

Avoid having a rtcache directly in a percpu storage

percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users. If the storages went short, percpu(9) enlarges them by

Avoid having a rtcache directly in a percpu storage

percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users. If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Using rtcache, i.e., packet processing, typically involves sleepable operations
such as rwlock so we must avoid dereferencing a rtcache that is directly stored
in a percpu storage during packet processing. Address this situation by having
just a pointer to a rtcache in a percpu storage instead.

Reviewed by knakahara@ and yamaguchi@

show more ...


# 183863f5 15-Sep-2019 bouyer <bouyer@NetBSD.org>

Packet filters can return an mbuf chain with fragmented headers, so
m_pullup() it if needed and remove the KASSERT()s.


# 6d8eb4f9 13-May-2019 ozaki-r <ozaki-r@NetBSD.org>

Count packets dropped by pfil


# e2f99c2d 17-Jan-2019 knakahara <knakahara@NetBSD.org>

Fix ipsecif(4) cannot apply input direction packet filter. Reviewed by ozaki-r@n.o and ryo@n.o.

Add ATF later.


# 5c987100 15-Nov-2018 maxv <maxv@NetBSD.org>

Remove the 't' argument from m_tag_find().


# 82a03f15 02-Sep-2018 maxv <maxv@NetBSD.org>

remove reference to ipnat, and duplicate comments


# 41fcd1f4 10-Jul-2018 maxv <maxv@NetBSD.org>

Remove the second argument from ip_reass_packet(). We want the IP header
on the mbuf, not elsewhere. Simplifies the NPF reassembly code a little.
No real functional change.


# a127c0eb 17-May-2018 maxv <maxv@NetBSD.org>

Add KASSERTs, related to PR/39794.


# 00ff305a 14-May-2018 maxv <maxv@NetBSD.org>

Merge ipsec4_input and ipsec6_input into ipsec_ip_input. Make the argument
a bool for clarity. Optimize the function: if M_CANFASTFWD is not there
(because already removed by the firewall) leave now.

Merge ipsec4_input and ipsec6_input into ipsec_ip_input. Make the argument
a bool for clarity. Optimize the function: if M_CANFASTFWD is not there
(because already removed by the firewall) leave now.

Makes it easier to see that M_CANFASTFWD is not removed on IPv6.

show more ...


# f813c44d 10-May-2018 maxv <maxv@NetBSD.org>

Rename ipsec4_forward -> ipsec_mtu, and switch to void.


# de9cefcf 26-Apr-2018 maxv <maxv@NetBSD.org>

Remove unused mbuf argument from sbsavetimestamp.


# f75d3c05 15-Apr-2018 maxv <maxv@NetBSD.org>

Introduce a m_verify_packet function, that verifies the mbuf chain of a
packet to ensure it is not malformed. Call this function in "points of
interest", that are the IPv4/IPv6/IPsec entry points. Th

Introduce a m_verify_packet function, that verifies the mbuf chain of a
packet to ensure it is not malformed. Call this function in "points of
interest", that are the IPv4/IPv6/IPsec entry points. There could be more.

We use M_VERIFY_PACKET(m), declared under DIAGNOSTIC only.

This function should not be called everywhere, especially not in places
that temporarily manipulate (and clobber) the mbuf structure; once they're
done they put the mbuf back in a correct format.

show more ...


12345678910>>...17