Revision e7c243c925f6d9dcb898504ff24d6650b5cbb3b1 authored by Evgeniy Polyakov on 25 August 2007, 06:36:29 UTC, committed by David S. Miller on 27 August 2007, 01:35:47 UTC
I tried to preserve bridging code as it was before, but logic is quite
strange - I think we should free skb on error, since it is already
unshared and thus will just leak.

Herbert Xu states:

> +	if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
> +		goto out;

If this happens it'll be a double-free on skb since we'll
return NF_DROP which makes the caller free it too.

We could return NF_STOLEN to prevent that but I'm not sure
whether that's correct netfilter semantics.  Patrick, could
you please make a call on this?

Patrick McHardy states:

NF_STOLEN should work fine here.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7c8347a
History
File Mode Size
Kbuild -rw-r--r-- 39 bytes
a.out.h -rw-r--r-- 1.0 KB
atomic.h -rw-r--r-- 3.4 KB
auxvec.h -rw-r--r-- 90 bytes
bitops.h -rw-r--r-- 3.3 KB
bug.h -rw-r--r-- 402 bytes
bugs.h -rw-r--r-- 786 bytes
byteorder.h -rw-r--r-- 1.0 KB
cache.h -rw-r--r-- 3.9 KB
cacheflush.h -rw-r--r-- 1.5 KB
cayman.h -rw-r--r-- 512 bytes
checksum.h -rw-r--r-- 2.1 KB
cpumask.h -rw-r--r-- 127 bytes
cputime.h -rw-r--r-- 115 bytes
current.h -rw-r--r-- 576 bytes
delay.h -rw-r--r-- 337 bytes
device.h -rw-r--r-- 129 bytes
div64.h -rw-r--r-- 119 bytes
dma-mapping.h -rw-r--r-- 5.1 KB
dma.h -rw-r--r-- 934 bytes
elf.h -rw-r--r-- 3.6 KB
emergency-restart.h -rw-r--r-- 149 bytes
errno.h -rw-r--r-- 119 bytes
fb.h -rw-r--r-- 375 bytes
fcntl.h -rw-r--r-- 26 bytes
futex.h -rw-r--r-- 82 bytes
hardirq.h -rw-r--r-- 446 bytes
hardware.h -rw-r--r-- 608 bytes
hw_irq.h -rw-r--r-- 354 bytes
ide.h -rw-r--r-- 602 bytes
io.h -rw-r--r-- 6.9 KB
ioctl.h -rw-r--r-- 31 bytes
ioctls.h -rw-r--r-- 4.7 KB
ipc.h -rw-r--r-- 29 bytes
ipcbuf.h -rw-r--r-- 904 bytes
irq.h -rw-r--r-- 3.3 KB
irq_regs.h -rw-r--r-- 34 bytes
kdebug.h -rw-r--r-- 32 bytes
keyboard.h -rw-r--r-- 2.0 KB
kmap_types.h -rw-r--r-- 135 bytes
linkage.h -rw-r--r-- 123 bytes
local.h -rw-r--r-- 120 bytes
mc146818rtc.h -rw-r--r-- 111 bytes
mman.h -rw-r--r-- 110 bytes
mmu.h -rw-r--r-- 115 bytes
mmu_context.h -rw-r--r-- 4.9 KB
module.h -rw-r--r-- 439 bytes
msgbuf.h -rw-r--r-- 1.2 KB
mutex.h -rw-r--r-- 308 bytes
namei.h -rw-r--r-- 557 bytes
page.h -rw-r--r-- 3.4 KB
param.h -rw-r--r-- 857 bytes
pci.h -rw-r--r-- 3.1 KB
percpu.h -rw-r--r-- 117 bytes
pgalloc.h -rw-r--r-- 2.9 KB
pgtable.h -rw-r--r-- 17.6 KB
platform.h -rw-r--r-- 1.8 KB
poll.h -rw-r--r-- 134 bytes
posix_types.h -rw-r--r-- 3.4 KB
processor.h -rw-r--r-- 6.5 KB
ptrace.h -rw-r--r-- 956 bytes
registers.h -rw-r--r-- 2.5 KB
resource.h -rw-r--r-- 126 bytes
scatterlist.h -rw-r--r-- 624 bytes
sci.h -rw-r--r-- 24 bytes
sections.h -rw-r--r-- 127 bytes
segment.h -rw-r--r-- 147 bytes
semaphore-helper.h -rw-r--r-- 2.4 KB
semaphore.h -rw-r--r-- 2.9 KB
sembuf.h -rw-r--r-- 975 bytes
serial.h -rw-r--r-- 830 bytes
setup.h -rw-r--r-- 632 bytes
shmbuf.h -rw-r--r-- 1.4 KB
shmparam.h -rw-r--r-- 285 bytes
sigcontext.h -rw-r--r-- 667 bytes
siginfo.h -rw-r--r-- 127 bytes
signal.h -rw-r--r-- 3.4 KB
smp.h -rw-r--r-- 342 bytes
socket.h -rw-r--r-- 118 bytes
sockios.h -rw-r--r-- 744 bytes
spinlock.h -rw-r--r-- 387 bytes
stat.h -rw-r--r-- 1.9 KB
statfs.h -rw-r--r-- 123 bytes
string.h -rw-r--r-- 502 bytes
system.h -rw-r--r-- 4.6 KB
termbits.h -rw-r--r-- 126 bytes
termios.h -rw-r--r-- 2.7 KB
thread_info.h -rw-r--r-- 2.4 KB
timex.h -rw-r--r-- 735 bytes
tlb.h -rw-r--r-- 2.3 KB
tlbflush.h -rw-r--r-- 914 bytes
topology.h -rw-r--r-- 131 bytes
types.h -rw-r--r-- 1.4 KB
uaccess.h -rw-r--r-- 9.1 KB
ucontext.h -rw-r--r-- 551 bytes
unaligned.h -rw-r--r-- 402 bytes
unistd.h -rw-r--r-- 11.4 KB
user.h -rw-r--r-- 2.6 KB

back to top