Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Fix big endian overflow in nf_flow_table, from Arnd Bergmann. 2) Fix port selection on big endian in nft_tproxy, from Phil Sutter. 3) Fix precision tracking for unbound scalars in bpf verifier, from Daniel Borkmann. 4) Fix integer overflow in socket rcvbuf check in UDP, from Antonio Messina. 5) Do not perform a neigh confirmation during a pmtu update over a tunnel, from Hangbin Liu. 6) Fix DMA mapping leak in dpaa_eth driver, from Madalin Bucur. 7) Various PTP fixes for sja1105 dsa driver, from Vladimir Oltean. 8) Add missing to dummy definition of of_mdiobus_child_is_phy(), from Geert Uytterhoeven * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (54 commits) hsr: fix slab-out-of-bounds Read in hsr_debugfs_rename() net/sched: add delete_empty() to filters and use it in cls_flower tcp: Fix highest_sack and highest_sack_seq ptp: fix the race between the release of ptp_clock and cdev net: dsa: sja1105: Reconcile the meaning of TPID and TPID2 for E/T and P/Q/R/S Documentation: net: dsa: sja1105: Remove text about taprio base-time limitation net: dsa: sja1105: Remove restriction of zero base-time for taprio offload net: dsa: sja1105: Really make the PTP command read-write net: dsa: sja1105: Take PTP egress timestamp by port, not mgmt slot cxgb4/cxgb4vf: fix flow control display for auto negotiation mlxsw: spectrum: Use dedicated policer for VRRP packets mlxsw: spectrum_router: Skip loopback RIFs during MAC validation net: stmmac: dwmac-meson8b: Fix the RGMII TX delay on Meson8b/8m2 SoCs net/sched: act_mirred: Pull mac prior redir to non mac_header_xmit device net_sched: sch_fq: properly set sk->sk_pacing_status bnx2x: Fix accounting of vlan resources among the PFs bnx2x: Use appropriate define for vlan credit of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy net: phy: aquantia: add suspend / resume ops for AQR105 dpaa_eth: fix DMA mapping leak ...
This commit is contained in:
1
tools/testing/selftests/bpf/.gitignore
vendored
1
tools/testing/selftests/bpf/.gitignore
vendored
@@ -40,3 +40,4 @@ xdping
|
||||
test_cpp
|
||||
/no_alu32
|
||||
/bpf_gcc
|
||||
bpf_helper_defs.h
|
||||
|
@@ -120,9 +120,9 @@ force:
|
||||
$(BPFOBJ): force
|
||||
$(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/
|
||||
|
||||
BPF_HELPERS := $(BPFDIR)/bpf_helper_defs.h $(wildcard $(BPFDIR)/bpf_*.h)
|
||||
$(BPFDIR)/bpf_helper_defs.h:
|
||||
$(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/ bpf_helper_defs.h
|
||||
BPF_HELPERS := $(OUTPUT)/bpf_helper_defs.h $(wildcard $(BPFDIR)/bpf_*.h)
|
||||
$(OUTPUT)/bpf_helper_defs.h:
|
||||
$(MAKE) -C $(BPFDIR) OUTPUT=$(OUTPUT)/ $(OUTPUT)/bpf_helper_defs.h
|
||||
|
||||
# Get Clang's default includes on this system, as opposed to those seen by
|
||||
# '-target bpf'. This fixes "missing" files on some architectures/distros,
|
||||
|
@@ -226,17 +226,19 @@ check_transfer()
|
||||
return 0
|
||||
}
|
||||
|
||||
test_tcp_forwarding()
|
||||
test_tcp_forwarding_ip()
|
||||
{
|
||||
local nsa=$1
|
||||
local nsb=$2
|
||||
local dstip=$3
|
||||
local dstport=$4
|
||||
local lret=0
|
||||
|
||||
ip netns exec $nsb nc -w 5 -l -p 12345 < "$ns2in" > "$ns2out" &
|
||||
lpid=$!
|
||||
|
||||
sleep 1
|
||||
ip netns exec $nsa nc -w 4 10.0.2.99 12345 < "$ns1in" > "$ns1out" &
|
||||
ip netns exec $nsa nc -w 4 "$dstip" "$dstport" < "$ns1in" > "$ns1out" &
|
||||
cpid=$!
|
||||
|
||||
sleep 3
|
||||
@@ -258,6 +260,28 @@ test_tcp_forwarding()
|
||||
return $lret
|
||||
}
|
||||
|
||||
test_tcp_forwarding()
|
||||
{
|
||||
test_tcp_forwarding_ip "$1" "$2" 10.0.2.99 12345
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
test_tcp_forwarding_nat()
|
||||
{
|
||||
local lret
|
||||
|
||||
test_tcp_forwarding_ip "$1" "$2" 10.0.2.99 12345
|
||||
lret=$?
|
||||
|
||||
if [ $lret -eq 0 ] ; then
|
||||
test_tcp_forwarding_ip "$1" "$2" 10.6.6.6 1666
|
||||
lret=$?
|
||||
fi
|
||||
|
||||
return $lret
|
||||
}
|
||||
|
||||
make_file "$ns1in" "ns1"
|
||||
make_file "$ns2in" "ns2"
|
||||
|
||||
@@ -283,14 +307,19 @@ ip -net ns2 route add 192.168.10.1 via 10.0.2.1
|
||||
# Same, but with NAT enabled.
|
||||
ip netns exec nsr1 nft -f - <<EOF
|
||||
table ip nat {
|
||||
chain prerouting {
|
||||
type nat hook prerouting priority 0; policy accept;
|
||||
meta iif "veth0" ip daddr 10.6.6.6 tcp dport 1666 counter dnat ip to 10.0.2.99:12345
|
||||
}
|
||||
|
||||
chain postrouting {
|
||||
type nat hook postrouting priority 0; policy accept;
|
||||
meta oifname "veth1" masquerade
|
||||
meta oifname "veth1" counter masquerade
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
test_tcp_forwarding ns1 ns2
|
||||
test_tcp_forwarding_nat ns1 ns2
|
||||
|
||||
if [ $? -eq 0 ] ;then
|
||||
echo "PASS: flow offloaded for ns1/ns2 with NAT"
|
||||
@@ -313,7 +342,7 @@ fi
|
||||
ip netns exec ns1 sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null
|
||||
ip netns exec ns2 sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null
|
||||
|
||||
test_tcp_forwarding ns1 ns2
|
||||
test_tcp_forwarding_nat ns1 ns2
|
||||
if [ $? -eq 0 ] ;then
|
||||
echo "PASS: flow offloaded for ns1/ns2 with NAT and pmtu discovery"
|
||||
else
|
||||
|
Reference in New Issue
Block a user