| Age | Commit message (Collapse) | Author |
|
|
|
Under the scenario with a packet with length of 67 bytes, a header length
using the default of 20 bytes and a TCP data offset (th_off) of 48 will
cause m_pullup() to fail to make sure bytes are arranged contiguously.
m_pullup() will free the mbuf chain and return a null. ipfilter stores
the resultant mbuf address (or the resulting NULL) in its fr_info_t
structure. Unfortunately the erroneous packet is not flagged for drop.
From FreeBSD via CY Schubert; originally reported by: Robert Morris
<rtm at lcs.mit.edu>
|
|
|
|
kernels without INET6 support end up with a different size of
this structure than the userland does and then it errors:
# ipnat -l
70:ioctl(SIOCGNATS) object size mismatch for copying out ipfobj
with these members (which are zeroed at ipf init) enabled, the
size check works.
XXX: pullup-9 (change tested there.)
|
|
Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)
XXX kernel ABI change to devsw_detach signature requires bump
|
|
|
|
|
|
|
|
|
|
https://cgit.freebsd.org/src/commit/?id=323a4e2c4e285e6f8eee8db3fe2cb74
|
|
|
|
ipfilter: Use the softn (NAT softc) host map size in ip_nat6
calculation. The ipfilter NAT table host map size is a tunable
that defaults to a macro value defined at build time. HOSTMAP_SIZE
is saved in softn (the ipnat softc) at initialization. It can be
tuned (changed) at runtime using the ipf -T command. If the
hostmap_size tunable is adjusted the calculation to determine where
to put new entries in the table was incorrect. Use the tunable in
the NAT softc instead of the static build time value.
|
|
tech-net@.
|
|
also, in SIOCADNAT, make sure to not leak kernel data
|
|
|
|
|
|
|
|
- make sure frag is initialized to 0
- initialize ipfr_p field
|
|
Fix incorrect byte order.
|
|
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.
|
|
this structure is part of the kernel/user ABI and so we would need to
version the ioctl ABI again in order to remove this field. but that's
a big pain so let's just leave the field there. the problem that
was being fixed in FreeBSD related to this was a failure to locate
filter rules in certain situations, but having an unused always-zero
field there won't cause that problem.
|
|
|
|
- pfil_run_hooks() can be called recursively, so we have to
#define FASTROUTE_RECURSION in fil.c
- ip6_if_output()/nd6_output() will free the mbuf on error, to make sure
to set *mpp to NULL so the caller won't try to free it again.
|
|
0xffff as bad
|
|
|
|
In addition to dropping these fragments, add a DTrace probe to allow
for more detailed monitoring and diagnosis if required.
From FreeBSD r349399, reported vy Cy Schubert
|
|
|
|
|
|
|
|
|
|
ip6_undefer_csum -> in6_undefer_cksum
in6_delayed_cksum -> in6_undefer_cksum_tcpudp
The two previous names were inconsistent and misleading.
Put the two functions into in6_offload.c. Add comments to explain what
we're doing.
Same as IPv4.
|
|
ip_undefer_csum -> in_undefer_cksum
in_delayed_cksum -> in_undefer_cksum_tcpudp
The two previous names were inconsistent and misleading.
Put the two functions into in_offload.c. Add comments to explain what
we're doing.
The same could be done for IPv6.
|
|
.rodata (3472 bytes).
Also, remove ipf_tuneables[], unused.
|
|
|
|
|
|
|
|
- frentry_4_1_0_to_current() has duplicated code section, found via
the indent checker. didn't setup a test to confirm the bug/fix,
but the other 2 similar functions are similar here now.
|
|
|
|
|
|
up accessing memory we did not allocate.
|
|
Timo Buhrmester
XXX: pullup 8.
|
|
|
|
ipf's return-icmp doesn't work when the packet matched by the rule is
directed at a link local address. The problem is that
ipf_send_icmp_err() calls ipf_ifpaddr() to find an address of the
interface in question, but that routine discards link local addresses.
I guess the best fix is to simply use the destination address instead if
it is link local, i.e. treat the rule as if return-icmp-as-dest was
given in this case.
|
|
the scope KAME style before calling the routing routines instead of after.
From Edgar Fuss.
|
|
|
|
|
|
now must specify keep frags along with keep state to have ipfilter do what
it did before, as documented in ipf.conf.5. (Cy Schubert @ FreeBSD)
|
|
issues and eventually panic.
|
|
The benefits of this change are:
- The flow is consistent with IPv4 (and FreeBSD and OpenBSD)
- old: ip6_output => nd6_output (do ND if needed) => L2_output (lookup a stored cache)
- new: ip6_output => L2_output (lookup a cache. Do ND if cache not found)
- We can remove some workarounds in nd6_output
- We can move L2 specific operations to their own place
- The performance slightly improves because one cache lookup is reduced
|
|
|