pf: Do not report a packet the outbound pass sent as dropped
For route-to on the inbound pass, pf_route() and pf_route6() run the
outbound pass on the new interface themselves and hand it the actions
of the rule. When that pass creates a state, the state has the route-to
as well, so the outbound pass sends the packet and returns PF_PASS
without an mbuf. Since 349360b17eab the caller turns this into PF_DROP,
and the pfil hook returns PFIL_DROPPED for a packet that was forwarded.
ip6_tryforward() then counts an input discard on the receiving
interface for every such packet.
Leave the action at PF_PASS, so that the hook returns PFIL_CONSUMED, as
it does when pf_route() or pf_route6() send the packet themselves.
Extend forward:v6_route_to_discards to rules that keep state.
Reviewed by: kp
Fixes: 349360b17eab ("pf: return errors from pf_route() and ...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D61674
netinet6: Do not count a packet a hook consumed as discarded in ip6_tryforward()
ip6_tryforward() treats every pfil result but PFIL_PASS as a drop: it
counts a discard on the receiving interface after the inbound hooks and
on the outgoing interface after the outbound hooks. A hook that
consumes the packet returns PFIL_CONSUMED instead: pf sends a packet a
route-to rule matches out itself, and sends a packet it reassembled on
in fragments. Those packets were forwarded, yet netstat -s -I shows
them as discarded, in the outbound case on the interface the route
lookup chose, which route-to did not even use. ip6_forward() and
ip_tryforward() count nothing for a consumed packet.
Return without counting when a hook consumed the packet. The new
forward:v6_route_to_discards test checks both passes. Its rules keep
no state: pf reports a packet it sent from the inbound hook as dropped
when its own outbound pass created a state, and that packet is still
counted.
Reviewed by: kp, glebius, pouria
[4 lines not shown]
netinet6: Decrement the hop limit before the outbound hooks in ip6_tryforward()
ip6_tryforward() decrements the hop limit after the outbound pfil hooks,
whereas ip_tryforward() and ip6_forward() do it before them. The hooks
therefore see a packet one hop older than the one that leaves, and a hook
that transmits the packet itself does not decrement it at all: pf's
route-to and reply-to on an outbound state send it on with the hop limit
it arrived with.
Decrement it right after the check, before the route lookup, as the other
two paths do. Errors sent after that point quote the decremented value,
as they do on those paths.
pf_refragment6() hands the fragments of a forwarded packet it
reassembled to ip6_forward(), which decrements the hop limit again, so
on the slow path such a packet has always lost two hops at this router,
and with this change it would on the fast path as well. Give the hop
back before ip6_forward(), unless ip6stealth is on, in which case
neither path decrements, or the hop limit is 255, which a scrub
[9 lines not shown]
netinet6: Keep a pfil-chosen next hop in ip6_tryforward()
When an inbound pfil hook chooses the next hop (ipfw fwd),
ip6_tryforward() looks up the route to it. After the outbound hooks it
decides whether they changed the destination by comparing the packet's
destination with the address it looked up, which is that next hop. The
two differ, so it looks up the route to the packet's destination again
and the fwd rule is lost. ipfw always installs an outbound hook, so
every packet such a rule matches goes the wrong way while
net.inet6.ip6.redirect is 0.
Compare with the destination as it was before the outbound hooks, as
ip6_forward() does.
Reviewed by: pouria
Fixes: 5a1842a2 ("Add ip6_tryforward() - a run to completion ...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D61038
emulators/libretro-np2kai: Add new port
Neko Project II kai is an emulator for the NEC PC-9801 series. This
port builds it's libretro core for RetroArch and other frontends.
WWW: https://github.com/AZO234/NP2kai
PR: 300383
if_epair: Hash the IP header, not the Ethernet header, for fanout
With RSS, epair_select_queue() hashes a packet that carries no RSS hash
with rss_soft_m2cpuid_v4() or rss_soft_m2cpuid_v6(), which read the IP
header at the start of the mbuf. On transmit the mbuf starts with the
Ethernet header, so the hash covered the MAC addresses, the EtherType
and the first bytes of the IP header, the IPv4 total length and
identification among them. The packets of one flow were spread over the
queues by their IP ID and delivered out of order, and the value was
stored in the mbuf as an RSS hash for the receiving side to use.
Step over the Ethernet header, and over inline 802.1Q or 802.1ad tags,
while the software hash runs. A tag is inline when vlan(4) or a bridge
member runs without VLAN_HWTAGGING, always for 802.1ad, and for the
inner tag of stacked vlans; those frames previously went to the first
queue unhashed. Frames with more than two tags still do.
Hash with rss_mbuf_software_hash_v4() and rss_mbuf_software_hash_v6()
and map the hash with rss_getbucket(), as the hardware hash path does,
[10 lines not shown]
www/nginx-devel: Security update to 1.31.9
A flow control window overflow in HTTP/2 and a use-after-free in the
resolver can corrupt worker process memory. Further use-after-free
conditions affect HTTP/2, HTTP/3 and the mail proxy, a buffer overflow is
reachable through "try_files" with "alias", and a request body over SSL can
send a worker into an endless loop. PROXY protocol version 2 with dynamic
certificate loading can fault a worker, and the stream module verified
client certificates against the default server rather than the one selected
by SNI.
Changelog: https://nginx.org/en/CHANGES
Security: 890d1126-e36c-11f1-bae2-3497f65b111b
Sponsored by: Netzkommune GmbH
www/nginx: Security update to 1.30.7
A flow control window overflow in HTTP/2 and a use-after-free in the
resolver can corrupt worker process memory. Further use-after-free
conditions affect HTTP/2, HTTP/3 and the mail proxy, a buffer overflow is
reachable through "try_files" with "alias", and a request body over SSL can
send a worker into an endless loop. The stream module verified client
certificates against the default server rather than the one selected by
SNI.
Changelog: https://nginx.org/en/CHANGES-1.30
Security: 890d1126-e36c-11f1-bae2-3497f65b111b
Sponsored by: Netzkommune GmbH
www/forgejo16: Deprecate
This is no longer supported. Users who want bleeding-edge Forgejo
should switch to www/forgejo17 if they haven't already.
MFH: 2026Q4
(cherry picked from commit 9ec40f3cd30755a589827ad9eea2a391f77c9308)
www/forgejo16: Deprecate
This is no longer supported. Users who want bleeding-edge Forgejo
should switch to www/forgejo17 if they haven't already.
MFH: 2026Q4