From d938cd00a45b0106d0d2d0f7eb137d44a3215b41 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 10 Jun 2022 08:53:32 +0200 Subject: [PATCH] Revert "net: fix dev_fill_forward_path with pppoe + bridge" This reverts commit f96b2e06721249ebf8da3254cfef29dcb6583948. It breaks the ABI and will be brought in through a different branch to preserve it. Signed-off-by: Greg Kroah-Hartman Change-Id: I729afbaefb667bd9e73260efb83c68e434e5bce6 --- drivers/net/ppp/pppoe.c | 1 - include/linux/netdevice.h | 2 +- net/core/dev.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index e172743948ed..3619520340b7 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c @@ -988,7 +988,6 @@ static int pppoe_fill_forward_path(struct net_device_path_ctx *ctx, path->encap.proto = htons(ETH_P_PPP_SES); path->encap.id = be16_to_cpu(po->num); memcpy(path->encap.h_dest, po->pppoe_pa.remote, ETH_ALEN); - memcpy(ctx->daddr, po->pppoe_pa.remote, ETH_ALEN); path->dev = ctx->dev; ctx->dev = dev; diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 39f1893ecac0..62ff09467776 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -887,7 +887,7 @@ struct net_device_path_stack { struct net_device_path_ctx { const struct net_device *dev; - u8 daddr[ETH_ALEN]; + const u8 *daddr; int num_vlans; struct { diff --git a/net/core/dev.c b/net/core/dev.c index d23d2d2716c3..f4e4bc677cbe 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -748,11 +748,11 @@ int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr, const struct net_device *last_dev; struct net_device_path_ctx ctx = { .dev = dev, + .daddr = daddr, }; struct net_device_path *path; int ret = 0; - memcpy(ctx.daddr, daddr, sizeof(ctx.daddr)); stack->num_paths = 0; while (ctx.dev && ctx.dev->netdev_ops->ndo_fill_forward_path) { last_dev = ctx.dev;