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;