android_kernel_sony_msm8994/Documentation
Lorenzo Colitti c5f40c905b net: support marking accepting TCP sockets
When using mark-based routing, sockets returned from accept()
may need to be marked differently depending on the incoming
connection request.

This is the case, for example, if different socket marks identify
different networks: a listening socket may want to accept
connections from all networks, but each connection should be
marked with the network that the request came in on, so that
subsequent packets are sent on the correct network.

This patch adds a sysctl to mark TCP sockets based on the fwmark
of the incoming SYN packet. If enabled, and an unmarked socket
receives a SYN, then the SYN packet's fwmark is written to the
connection's inet_request_sock, and later written back to the
accepted socket when the connection is established.  If the
socket already has a nonzero mark, then the behaviour is the same
as it is today, i.e., the listening socket's fwmark is used.

Black-box tested using user-mode linux:

- IPv4/IPv6 SYN+ACK, FIN, etc. packets are routed based on the
  mark of the incoming SYN packet.
- The socket returned by accept() is marked with the mark of the
  incoming SYN packet.
- Tested with syncookies=1 and syncookies=2.

Change-Id: I26bc1eceefd2c588d73b921865ab70e4645ade57
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Git-commit: 6ba3a0e3b112bdb47858e97aa763706ba26ca5ea
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-06-23 15:21:22 -07:00
..
ABI acpi-cpufreq: Add new sysfs attribute freqdomain_cpus 2013-12-20 19:06:57 -08:00
accounting
acpi Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2013-05-09 09:46:45 -07:00
aoe
arm msm: ipc_logging: enhance log-extraction support 2014-05-27 13:56:54 -06:00
arm64 arm64: documentation: tighten up tagged pointer documentation 2014-06-13 12:06:10 -07:00
ata ata: ahci: MSM AHCI controller driver 2013-09-04 16:25:35 -07:00
auxdisplay
backlight backlight: lp855x: remove duplicate platform data 2013-04-29 18:28:19 -07:00
blackfin
block Documentation: block: ROW I/O scheduler 2013-07-08 05:54:58 -07:00
blockdev
bus-devices
cdrom
cgroups cgroup: Add generic cgroup subsystem permission checks 2013-07-01 13:38:49 -07:00
connector
console
cpu-freq cpufreq: Implement light weight ->target_index() routine 2013-12-20 19:07:16 -08:00
cpuidle cpuidle: make a single register function for all 2013-04-23 13:45:22 +02:00
cris
crypto crypto: Add MSM crypto drivers 2013-09-04 14:47:05 -07:00
development-process
device-mapper DM RAID: Add message/status support for changing sync action 2013-04-24 11:42:43 +10:00
devicetree Merge "power: vm-bms: update PON OCV measurement" 2014-06-22 08:38:49 -07:00
DocBook media: DocBook: upgrade media_api DocBook version to 4.2 2013-09-26 17:18:20 -07:00
driver-model
dvb media: dvb: mpq: Use kthread instead of workqueue 2013-09-04 15:39:41 -07:00
early-userspace
EDID
extcon
fault-injection
fb
filesystems mm: add a field to store names for private anonymous memory 2014-06-13 12:05:14 -07:00
firmware_class
frv
hid
hwmon hwmon: (k10temp) Add support for Fam16h (Kabini) 2013-09-07 22:09:59 -07:00
i2c i2c: i801: SMBus patch for Intel Coleto Creek DeviceIDs 2014-02-13 13:48:03 -08:00
i2o
ia64
ide
infiniband
input
ioctl
isdn
ja_JP
kbuild Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2013-05-07 07:59:19 -07:00
kdump
ko_KR
laptops
leds
m68k block: remove refs to XD disks from documentation 2013-05-17 15:17:12 +02:00
make
memory-devices
metag
mips
misc-devices
mmc mmc: use percentage changed sectors as indication to check BKOPS need 2013-09-04 15:47:27 -07:00
mn10300
mtd mtd: msm_qpic_nand: Initial driver for QPIC based NAND controller 2013-09-04 15:04:24 -07:00
namespaces
netlabel
networking net: support marking accepting TCP sockets 2014-06-23 15:21:22 -07:00
nfc
parisc parisc: document the shadow registers 2013-07-21 18:21:26 -07:00
PCI
pcmcia
power QoS: Enhance framework to support cpu/irq specific QoS requests 2014-06-18 10:39:21 -06:00
powerpc powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions 2013-06-01 08:29:23 +10:00
pps
prctl
pti
ptp
rapidio rapidio: documentation update for enumeration changes 2013-05-24 16:22:50 -07:00
RCU Merge commit '8700c95adb03' into timers/nohz 2013-05-02 17:54:19 +02:00
s390 s390/cio: add condev keyword to cio_ignore 2013-05-02 15:50:20 +02:00
scheduler
scsi
security
serial
sh
sound Add snapshot of mach-msm from beginning of msm-3.4 2013-09-04 14:53:53 -07:00
spi
sysctl Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
target
thermal Thermal: update documentation for thermal_zone_device_register 2013-04-27 09:16:04 +08:00
timers nohz_full: Add documentation. 2013-04-27 16:41:43 -07:00
trace msm: tracing: Add ftrace support for RPM driver 2013-09-04 15:35:59 -07:00
usb USB: ice40-hcd: Add ICE40 FPGA based SPI to Inter-Chip USB host driver 2014-03-10 11:18:35 +05:30
vDSO
video4linux media: media: gspca: sn9c20x: add ID for Genius Look 1320 V2 2014-05-06 07:55:31 -07:00
virtual Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-05-05 14:47:31 -07:00
vm ksm: Provide support to use deferred timers for scanner thread 2014-03-17 18:43:12 +05:30
w1
watchdog
wimax
x86 Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:35:20 -07:00
xtensa xtensa: document MMUv3 setup sequence 2013-05-09 01:07:09 -07:00
zh_CN
.gitignore
00-INDEX Documentation: Add documentation for the MIPI-BIF framework 2013-09-04 16:14:56 -07:00
android.txt cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-12-20 19:07:16 -08:00
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
bcache.txt bcache: clarify free/available/unused space 2013-05-15 00:42:52 -07:00
bif-framework.txt bif: bif-core: add BIF NVM object writing support 2013-10-10 13:29:46 -07:00
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt
cachetlb.txt
Changes
circular-buffers.txt
clk.txt clk: add clk_ignore_unused option to keep boot clocks on 2013-04-27 23:03:43 -07:00
coccinelle.txt
CodingStyle
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt block: remove refs to XD disks from documentation 2013-05-17 15:17:12 +02:00
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt common: DMA-mapping: Add strongly ordered memory attribute 2013-07-08 05:54:54 -07:00
dma-buf-sharing.txt dma-buf: replace dma_buf_export() with dma_buf_export_named() 2013-05-01 16:35:36 +05:30
DMA-ISA-LPC.txt
dmaengine.txt
dmatest.txt dmatest: do not allow to interrupt ongoing tests 2013-06-08 02:13:44 +05:30
dontdiff
dynamic-debug-howto.txt
edac.txt
eisa.txt
email-clients.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt
highuid.txt
HOWTO
hw_random.txt
hwspinlock.txt
init.txt
initrd.txt
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt iostats.txt: add easy-to-find description for field 6 2013-04-29 15:18:50 +02:00
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt smp: Allow booting a specific subset of CPUs 2014-05-20 14:56:58 -07:00
kernel-per-CPU-kthreads.txt kthread: Document ways of reducing OS jitter due to per-CPU kthreads 2013-04-27 16:52:47 -07:00
kmemcheck.txt
kmemleak.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
lockup-watchdogs.txt
logo.gif
logo.txt
magic-number.txt
Makefile
ManagementStyle
md.txt MD: Fix typos in MD documentation 2013-04-24 11:42:42 +10:00
media-framework.txt
memory-barriers.txt
memory-hotplug.txt
mono.txt
mutex-design.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
padata.txt
page_owner.c debugging: keep track of page owners 2014-03-28 13:33:08 -07:00
parport-lowlevel.txt
parport.txt
percpu-rw-semaphore.txt
phy.txt drivers: phy: add generic PHY framework 2013-12-10 08:17:57 +05:30
pi-futex.txt
pinctrl.txt
pnp.txt
preempt-locking.txt
printk-formats.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 13:47:37 -07:00
pwm.txt
ramoops.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
smsc_ece1099.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
static-keys.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches checkpatch: add Suggested-by as a standard signature 2013-04-29 18:28:20 -07:00
svga.txt
sync.txt sync: add Documentation/sync.txt 2013-07-01 14:16:12 -07:00
sysfs-rules.txt
sysrq.txt Documentation/sysrq: fix inconstistent help message of sysrq key 2013-04-30 17:04:10 -07:00
this_cpu_ops.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vfio.txt
VGA-softcursor.txt
vgaarbiter.txt
video-output.txt
vme_api.txt
volatile-considered-harmful.txt
workqueue.txt
xz.txt
zorro.txt