diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2019-07-02 15:00:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-28 08:27:18 +0200 |
commit | 834d58cdf8933e7da61146415a71912d0cb4f5f7 (patch) | |
tree | 90f217beb01d7fbcf1775cbb87510204a3a90d49 | |
parent | 67c076d28c57e956a82077f87fe55d4de045b55a (diff) | |
download | linux-stable-834d58cdf8933e7da61146415a71912d0cb4f5f7.tar.gz linux-stable-834d58cdf8933e7da61146415a71912d0cb4f5f7.tar.bz2 linux-stable-834d58cdf8933e7da61146415a71912d0cb4f5f7.zip |
net: bridge: stp: don't cache eth dest pointer before skb pull
[ Upstream commit 2446a68ae6a8cee6d480e2f5b52f5007c7c41312 ]
Don't cache eth dest pointer before calling pskb_may_pull.
Fixes: cf0f02d04a83 ("[BRIDGE]: use llc for receiving STP packets")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/bridge/br_stp_bpdu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index 68a6922b4141..7796dd9d42d7 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c @@ -143,7 +143,6 @@ void br_send_tcn_bpdu(struct net_bridge_port *p) void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb, struct net_device *dev) { - const unsigned char *dest = eth_hdr(skb)->h_dest; struct net_bridge_port *p; struct net_bridge *br; const unsigned char *buf; @@ -172,7 +171,7 @@ void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb, if (p->state == BR_STATE_DISABLED) goto out; - if (!ether_addr_equal(dest, br->group_addr)) + if (!ether_addr_equal(eth_hdr(skb)->h_dest, br->group_addr)) goto out; if (p->flags & BR_BPDU_GUARD) { |