android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Colitti 34e23dee72 BACKPORT: net: xfrm: support setting an output mark.
On systems that use mark-based routing it may be necessary for
routing lookups to use marks in order for packets to be routed
correctly. An example of such a system is Android, which uses
socket marks to route packets via different networks.

Currently, routing lookups in tunnel mode always use a mark of
zero, making routing incorrect on such systems.

This patch adds a new output_mark element to the xfrm state and
a corresponding XFRMA_OUTPUT_MARK netlink attribute. The output
mark differs from the existing xfrm mark in two ways:

1. The xfrm mark is used to match xfrm policies and states, while
   the xfrm output mark is used to set the mark (and influence
   the routing) of the packets emitted by those states.
2. The existing mark is constrained to be a subset of the bits of
   the originating socket or transformed packet, but the output
   mark is arbitrary and depends only on the state.

The use of a separate mark provides additional flexibility. For
example:

- A packet subject to two transforms (e.g., transport mode inside
  tunnel mode) can have two different output marks applied to it,
  one for the transport mode SA and one for the tunnel mode SA.
- On a system where socket marks determine routing, the packets
  emitted by an IPsec tunnel can be routed based on a mark that
  is determined by the tunnel, not by the marks of the
  unencrypted packets.
- Support for setting the output marks can be introduced without
  breaking any existing setups that employ both mark-based
  routing and xfrm tunnel mode. Simply changing the code to use
  the xfrm mark for routing output packets could xfrm mark could
  change behaviour in a way that breaks these setups.

If the output mark is unspecified or set to zero, the mark is not
set or changed.

[backport of upstream 077fbac405bfc6d41419ad6c1725804ad4e9887c]

Bug: 63589535
Test: https://android-review.googlesource.com/452776/ passes
Tested: make allyesconfig; make -j64
Tested: https://android-review.googlesource.com/452776
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Change-Id: I76120fba036e21780ced31ad390faf491ea81e52
2017-10-11 11:52:23 +09:00
..
acpi ACPICA: Linuxize: Restore and fix Intel compiler build 2017-02-26 11:10:52 +01:00
asm-generic cpumask: fix spurious cpumask_of_node() on non-NUMA multi-node configs 2017-09-07 08:35:40 +02:00
clocksource
crypto crypto: ahash - Fix EINPROGRESS notification callback 2017-04-21 09:31:23 +02:00
drm This is the 4.9.33 stable release 2017-06-27 10:43:04 +02:00
dt-bindings dt: bindings: net: use boolean dt properties for eee broken modes 2017-07-05 14:40:20 +02:00
keys
kvm
linux This is the 4.9.54 stable release 2017-10-08 10:49:06 +02:00
math-emu
media Linux 4.8 2016-10-05 16:43:53 -03:00
memory
misc
net BACKPORT: net: xfrm: support setting an output mark. 2017-10-11 11:52:23 +09:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2017-03-12 06:41:50 +01:00
rxrpc
scsi scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state 2017-07-27 15:07:59 -07:00
soc ARM: at91: define LPDDR types 2017-03-12 06:41:41 +01:00
sound ASoC: hdmi-codec: use unsigned type to structure members with bit-field 2017-01-19 20:18:02 +01:00
target iscsi-target: Fix iscsi_np reset hung task during parallel delete 2017-08-16 13:43:16 -07:00
trace FROMLIST: tracing: Add support for preempt and irq enable/disable events 2017-10-06 16:20:25 -07:00
uapi BACKPORT: net: xfrm: support setting an output mark. 2017-10-11 11:52:23 +09:00
video fbdev changes for 4.9 2016-10-12 11:01:37 -07:00
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:44:05 +02:00
Kbuild