linux-stable/drivers/net
David Ahern eb63ecc170 net: vrf: Drop conntrack data after pass through VRF device on Tx
Locally originated traffic in a VRF fails in the presence of a POSTROUTING
rule. For example,

    $ iptables -t nat -A POSTROUTING -s 11.1.1.0/24  -j MASQUERADE
    $ ping -I red -c1 11.1.1.3
    ping: Warning: source address might be selected on device other than red.
    PING 11.1.1.3 (11.1.1.3) from 11.1.1.2 red: 56(84) bytes of data.
    ping: sendmsg: Operation not permitted

Worse, the above causes random corruption resulting in a panic in random
places (I have not seen a consistent backtrace).

Call nf_reset to drop the conntrack info following the pass through the
VRF device.  The nf_reset is needed on Tx but not Rx because of the order
in which NF_HOOK's are hit: on Rx the VRF device is after the real ingress
device and on Tx it is is before the real egress device. Connection
tracking should be tied to the real egress device and not the VRF device.

Fixes: 8f58336d3f ("net: Add ethernet header for pass through VRF device")
Fixes: 35402e3136 ("net: Add IPv6 support to VRF device")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17 10:47:31 -05:00
..
appletalk
arcnet
bonding
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
cris
dsa net: dsa: mv88e6xxx: Fix opps when adding vlan bridge 2016-12-16 13:26:50 -05:00
ethernet net: macb: Added PCI wrapper for Platform Driver. 2016-12-17 10:24:33 -05:00
fddi
fjes
hamradio
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
ieee802154 ieee802154: atusb: implement .set_frame_retries ops callback 2016-12-08 07:43:29 +01:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
irda irda: w83977af_ir: Neaten logging 2016-12-06 21:46:56 -05:00
phy net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause 2016-12-10 23:31:19 -05:00
plip
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-10 16:21:55 -05:00
vmxnet3
wan
wimax
wireless iwlwifi: use reset to set transport header 2016-12-03 15:49:16 -05:00
xen-netback
dummy.c dummy: expend mtu range for dummy device 2016-12-07 13:29:45 -05:00
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-02 14:07:11 -05:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c macsec: remove first zero and add attribute name in comments 2016-12-08 13:08:21 -05:00
macvlan.c driver: macvlan: Remove the rcu member of macvlan_port 2016-12-07 13:22:07 -05:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c nlmon: use core MTU range checking in nlmon driver 2016-12-07 13:28:26 -05:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c tun: Use netif_receive_skb instead of netif_rx 2016-12-06 22:24:59 -05:00
veth.c
virtio_net.c virtio-net: correctly enable multiqueue 2016-12-13 10:37:38 -05:00
vrf.c net: vrf: Drop conntrack data after pass through VRF device on Tx 2016-12-17 10:47:31 -05:00
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-12-03 12:29:53 -05:00
xen-netfront.c