Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ad0d526 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull networking fixes from David Miller:

 1) Fix races in IPVS, from Tan Hu.

 2) Missing unbind in matchall classifier, from Hangbin Liu.

 3) Missing act_ife action release, from Vlad Buslov.

 4) Cure lockdep splats in ila, from Cong Wang.

 5) veth queue leak on link delete, from Toshiaki Makita.

 6) Disable isdn's IIOCDBGVAR ioctl, it exposes kernel addresses. From
    Kees Cook.

 7) RCU usage fixup in XDP, from Tariq Toukan.

 8) Two TCP ULP fixes from Daniel Borkmann.

 9) r8169 needs REALTEK_PHY as a Kconfig dependency, from Heiner
    Kallweit.

10) Always take tcf_lock with BH disabled, otherwise we can deadlock
    with rate estimator code paths. From Vlad Buslov.

11) Don't use MSI-X on RTL8106e r8169 chips, they don't resume properly.
    From Jian-Hong Pan.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
  ip6_vti: fix creating fallback tunnel device for vti6
  ip_vti: fix a null pointer deferrence when create vti fallback tunnel
  r8169: don't use MSI-X on RTL8106e
  net: lan743x_ptp: convert to ktime_get_clocktai_ts64
  net: sched: always disable bh when taking tcf_lock
  ip6_vti: simplify stats handling in vti6_xmit
  bpf: fix redirect to map under tail calls
  r8169: add missing Kconfig dependency
  tools/bpf: fix bpf selftest test_cgroup_storage failure
  bpf, sockmap: fix sock_map_ctx_update_elem race with exist/noexist
  bpf, sockmap: fix map elem deletion race with smap_stop_sock
  bpf, sockmap: fix leakage of smap_psock_map_entry
  tcp, ulp: fix leftover icsk_ulp_ops preventing sock from reattach
  tcp, ulp: add alias for all ulp modules
  bpf: fix a rcu usage warning in bpf_prog_array_copy_core()
  samples/bpf: all XDP samples should unload xdp/bpf prog on SIGTERM
  net/xdp: Fix suspicious RCU usage warning
  net/mlx5e: Delete unneeded function argument
  Documentation: networking: ti-cpsw: correct cbs parameters for Eth1 100Mb
  isdn: Disable IIOCDBGVAR
  ...
parents e61cf2e3 e2948e5a
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -4,7 +4,9 @@ Microchip KSZ Series Ethernet switches
Required properties:
Required properties:


- compatible: For external switch chips, compatible string must be exactly one
- compatible: For external switch chips, compatible string must be exactly one
  of: "microchip,ksz9477"
  of the following:
  - "microchip,ksz9477"
  - "microchip,ksz9897"


See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
required and optional properties.
required and optional properties.
+2 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@ Required properties:
      - "renesas,etheravb-rcar-gen2" as a fallback for the above
      - "renesas,etheravb-rcar-gen2" as a fallback for the above
		R-Car Gen2 and RZ/G1 devices.
		R-Car Gen2 and RZ/G1 devices.


      - "renesas,etheravb-r8a774a1" for the R8A774A1 SoC.
      - "renesas,etheravb-r8a7795" for the R8A7795 SoC.
      - "renesas,etheravb-r8a7795" for the R8A7795 SoC.
      - "renesas,etheravb-r8a7796" for the R8A7796 SoC.
      - "renesas,etheravb-r8a7796" for the R8A7796 SoC.
      - "renesas,etheravb-r8a77965" for the R8A77965 SoC.
      - "renesas,etheravb-r8a77965" for the R8A77965 SoC.
@@ -24,7 +25,7 @@ Required properties:
      - "renesas,etheravb-r8a77990" for the R8A77990 SoC.
      - "renesas,etheravb-r8a77990" for the R8A77990 SoC.
      - "renesas,etheravb-r8a77995" for the R8A77995 SoC.
      - "renesas,etheravb-r8a77995" for the R8A77995 SoC.
      - "renesas,etheravb-rcar-gen3" as a fallback for the above
      - "renesas,etheravb-rcar-gen3" as a fallback for the above
		R-Car Gen3 devices.
		R-Car Gen3 and RZ/G2 devices.


	When compatible with the generic version, nodes must list the
	When compatible with the generic version, nodes must list the
	SoC-specific version corresponding to the platform first followed by
	SoC-specific version corresponding to the platform first followed by
+6 −5
Original line number Original line Diff line number Diff line
@@ -469,17 +469,18 @@ $ tc -g class show dev eth1


14)
14)
// Set rate for class A - 31 Mbit (tc0, txq2) using CBS Qdisc for Eth1
// Set rate for class A - 31 Mbit (tc0, txq2) using CBS Qdisc for Eth1
// here only idle slope is important, others ignored
// here only idle slope is important, others ignored, but calculated
// for interface speed - 100Mb for eth1 port.
// Set it +1 Mb for reserve (important!)
// Set it +1 Mb for reserve (important!)
$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1453 \
$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1035 \
hicredit 47 sendslope -969000 idleslope 31000 offload 1
hicredit 465 sendslope -69000 idleslope 31000 offload 1
net eth1: set FIFO3 bw = 31
net eth1: set FIFO3 bw = 31


15)
15)
// Set rate for class B - 11 Mbit (tc1, txq3) using CBS Qdisc for Eth1
// Set rate for class B - 11 Mbit (tc1, txq3) using CBS Qdisc for Eth1
// Set it +1 Mb for reserve (important!)
// Set it +1 Mb for reserve (important!)
$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1483 \
$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1335 \
hicredit 34 sendslope -989000 idleslope 11000 offload 1
hicredit 405 sendslope -89000 idleslope 11000 offload 1
net eth1: set FIFO2 bw = 11
net eth1: set FIFO2 bw = 11


16)
16)
+27 −7
Original line number Original line Diff line number Diff line
@@ -5,19 +5,28 @@ This feature adds Linux 2.2-like transparent proxy support to current kernels.
To use it, enable the socket match and the TPROXY target in your kernel config.
To use it, enable the socket match and the TPROXY target in your kernel config.
You will need policy routing too, so be sure to enable that as well.
You will need policy routing too, so be sure to enable that as well.


From Linux 4.18 transparent proxy support is also available in nf_tables.


1. Making non-local sockets work
1. Making non-local sockets work
================================
================================


The idea is that you identify packets with destination address matching a local
The idea is that you identify packets with destination address matching a local
socket on your box, set the packet mark to a certain value, and then match on that
socket on your box, set the packet mark to a certain value:
value using policy routing to have those packets delivered locally:


# iptables -t mangle -N DIVERT
# iptables -t mangle -N DIVERT
# iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
# iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
# iptables -t mangle -A DIVERT -j MARK --set-mark 1
# iptables -t mangle -A DIVERT -j MARK --set-mark 1
# iptables -t mangle -A DIVERT -j ACCEPT
# iptables -t mangle -A DIVERT -j ACCEPT


Alternatively you can do this in nft with the following commands:

# nft add table filter
# nft add chain filter divert "{ type filter hook prerouting priority -150; }"
# nft add rule filter divert meta l4proto tcp socket transparent 1 meta mark set 1 accept

And then match on that value using policy routing to have those packets
delivered locally:

# ip rule add fwmark 1 lookup 100
# ip rule add fwmark 1 lookup 100
# ip route add local 0.0.0.0/0 dev lo table 100
# ip route add local 0.0.0.0/0 dev lo table 100


@@ -57,17 +66,28 @@ add rules like this to the iptables ruleset above:
# iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY \
# iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY \
  --tproxy-mark 0x1/0x1 --on-port 50080
  --tproxy-mark 0x1/0x1 --on-port 50080


Or the following rule to nft:

# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept

Note that for this to work you'll have to modify the proxy to enable (SOL_IP,
Note that for this to work you'll have to modify the proxy to enable (SOL_IP,
IP_TRANSPARENT) for the listening socket.
IP_TRANSPARENT) for the listening socket.


As an example implementation, tcprdr is available here:
https://git.breakpoint.cc/cgit/fw/tcprdr.git/
This tool is written by Florian Westphal and it was used for testing during the
nf_tables implementation.


3. Iptables extensions
3. Iptables and nf_tables extensions
======================
====================================


To use tproxy you'll need to have the 'socket' and 'TPROXY' modules
To use tproxy you'll need to have the following modules compiled for iptables:
compiled for iptables. A patched version of iptables is available
 - NETFILTER_XT_MATCH_SOCKET
here: http://git.balabit.hu/?p=bazsi/iptables-tproxy.git
 - NETFILTER_XT_TARGET_TPROXY


Or the floowing modules for nf_tables:
 - NFT_SOCKET
 - NFT_TPROXY


4. Application support
4. Application support
======================
======================
+1 −7
Original line number Original line Diff line number Diff line
@@ -1640,13 +1640,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
			} else
			} else
				return -EINVAL;
				return -EINVAL;
		case IIOCDBGVAR:
		case IIOCDBGVAR:
			if (arg) {
				if (copy_to_user(argp, &dev, sizeof(ulong)))
					return -EFAULT;
				return 0;
			} else
			return -EINVAL;
			return -EINVAL;
			break;
		default:
		default:
			if ((cmd & IIOCDRVCTL) == IIOCDRVCTL)
			if ((cmd & IIOCDRVCTL) == IIOCDRVCTL)
				cmd = ((cmd >> _IOC_NRSHIFT) & _IOC_NRMASK) & ISDN_DRVIOCTL_MASK;
				cmd = ((cmd >> _IOC_NRSHIFT) & _IOC_NRMASK) & ISDN_DRVIOCTL_MASK;
Loading