freebsd-dev/sys
Kristof Provost 1873dcc8c9 pf: Skip firewall for refragmented ip6 packets
In cases where we scrub (fragment reassemble) on both input and output
we risk ending up in infinite loops when forwarding packets.

Fragmented packets come in and get collected until we can defragment. At
that point the defragmented packet is handed back to the ip stack (at
the pfil point in ip6_input(). Normal processing continues.

Eventually we figure out that the packet has to be forwarded and we end
up at the pfil hook in ip6_forward(). After doing the inspection on the
defragmented packet we see that the packet has been defragmented and
because we're forwarding we have to refragment it.

In pf_refragment6() we split the packet up again and then ip6_forward()
the individual fragments.  Those fragments hit the pfil hook on the way
out, so they're collected until we can reconstruct the full packet, at
which point we're right back where we left off and things continue until
we run out of stack.

Break that loop by marking the fragments generated by pf_refragment6()
as M_SKIP_FIREWALL. There's no point in processing those packets in the
firewall anyway. We've already filtered on the full packet.

Differential Revision:	https://reviews.freebsd.org/D2197
Reviewed by:	glebius, gnn
Approved by:	gnn (mentor)
2015-04-06 19:05:00 +00:00
..
amd64 Enhance the support for Group 1 Extended opcodes: 2015-04-06 12:22:41 +00:00
arm Add support to the efi boot1 and loader for 32-bit ARM. This will be used 2015-04-06 15:50:20 +00:00
arm64/include Split out the _acq and _rel functions. These were the same, but there is 2015-04-06 16:27:22 +00:00
boot Add support to the efi boot1 and loader for 32-bit ARM. This will be used 2015-04-06 15:50:20 +00:00
bsm
cam Add some additional quirks for various Western Digital Caviar MHDDs 2015-03-30 09:05:20 +00:00
cddl Add DTrace probe to the new ARC reclaim cause added in r281026. 2015-04-05 14:45:52 +00:00
compat Remove unused code. 2015-04-02 10:19:24 +00:00
conf Add support for the MIPS74K SoC family performance counters events. 2015-04-05 02:57:02 +00:00
contrib o Use new function ip_fillid() in all places throughout the kernel, 2015-04-01 22:26:39 +00:00
crypto Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
ddb ddb: ANSI-fy function declarations. 2014-10-12 18:01:52 +00:00
dev Move the message complaining about failed system resource allocations 2015-04-06 17:39:36 +00:00
fs Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact, 2015-04-05 21:10:38 +00:00
gdb
geom Remove extra semicolon. 2015-03-27 12:45:20 +00:00
gnu File names with commas in them cause issues for freebsd-update. We 2015-03-12 06:43:58 +00:00
i386 Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
isa
kern Add vmem locking to r281026. 2015-04-05 14:17:26 +00:00
kgssapi Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
libkern Implement asprintf in libkern 2015-03-01 00:22:16 +00:00
mips Convert the DIR-825C1 to use the new map based MAC address configuration. 2015-04-05 22:00:44 +00:00
modules Fix build race on armv6* and powerpc*. 2015-04-04 20:30:20 +00:00
net Fix a possible mbuf leak on interface departure. 2015-03-26 23:40:22 +00:00
net80211 Initialise the pps / packet tracking timestamp so 11n aggregation works again. 2015-03-22 17:54:00 +00:00
netgraph Change the callout to supply -1 to indicate we are not changing 2015-03-28 12:50:24 +00:00
netinet Add sleepable lock to protect at least against two parallel SIOCSVHs. 2015-04-06 15:31:19 +00:00
netinet6 Preserve IPv6 fragment IDs accross reassembly and refragmentation 2015-04-01 12:15:01 +00:00
netipsec o Use new function ip_fillid() in all places throughout the kernel, 2015-04-01 22:26:39 +00:00
netnatm
netpfil pf: Skip firewall for refragmented ip6 packets 2015-04-06 19:05:00 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient Remove the old NFS client and server from head, 2014-12-23 00:47:46 +00:00
nfsserver Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro 2015-01-07 17:22:56 +00:00
nlm Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
ofed Fix variable casting: 2015-03-27 19:08:11 +00:00
opencrypto Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
pc98 Factor out duplicated code from dumpsys() on each architecture into generic 2015-01-07 01:01:39 +00:00
powerpc Fix the index for FAULTBUF_R13, missed during merge/cleanup. 2015-04-06 16:29:45 +00:00
rpc Fix overflow bugs in and remove obsolete limit from kernel RPC 2015-04-01 00:45:47 +00:00
security cred: add proc_set_cred helper 2015-03-16 00:10:03 +00:00
sparc64 Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
sys Convert printfs in m_ext allocator to KASSERTs. 2015-04-06 09:15:18 +00:00
teken mdoc: improvements to SEE ALSO. 2014-12-27 07:07:37 +00:00
tools
ufs Fix build (with gcc). 2015-03-27 15:49:21 +00:00
vm Properly calculate "UMA Zones" per cpu cache size. Avoid allocating 2015-04-06 18:45:41 +00:00
x86 When mapping an allocated entry, use the entry size, instead of the 2015-03-24 12:48:51 +00:00
xdr
xen Use SYSCTL_OUT_STR() to return strings. 2015-03-14 21:40:24 +00:00
Makefile