aboutsummaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorNikolay Aleksandrov2019-04-11 13:56:39 +0300
committerDavid S. Miller2019-04-16 20:30:40 -0700
commit3b2e2904deb314cc77a2192f506f2fd44e3d10d0 (patch)
treea81ef54cc6e58bd40064722566af5c1eb85da69b /usr
parent614c70f35cd77a9af8e2ca841dcdb121cec3068f (diff)
net: bridge: fix per-port af_packet sockets
When the commit below was introduced it changed two visible things: - the skb was no longer passed through the protocol handlers with the original device - the skb was passed up the stack with skb->dev = bridge The first change broke af_packet sockets on bridge ports. For example we use them for hostapd which listens for ETH_P_PAE packets on the ports. We discussed two possible fixes: - create a clone and pass it through NF_HOOK(), act on the original skb based on the result - somehow signal to the caller from the okfn() that it was called, meaning the skb is ok to be passed, which this patch is trying to implement via returning 1 from the bridge link-local okfn() Note that we rely on the fact that NF_QUEUE/STOLEN would return 0 and drop/error would return < 0 thus the okfn() is called only when the return was 1, so we signal to the caller that it was called by preserving the return value from nf_hook(). Fixes: 8626c56c8279 ("bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict") Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions