summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-05-09 14:26:15 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-05-16 12:58:55 +0200
commitcf2df74e202d81b09f09d84c2d8903e0e87e9274 (patch)
treec9c35f8edca78eae03688115ce9cb5ea9993fdd5 /net/core/dev.c
parent45ca3e61999e9a30ca2b7cfbf9da8a9f8d13be31 (diff)
downloadlinux-cf2df74e202d81b09f09d84c2d8903e0e87e9274.tar.gz
linux-cf2df74e202d81b09f09d84c2d8903e0e87e9274.tar.bz2
linux-cf2df74e202d81b09f09d84c2d8903e0e87e9274.zip
net: fix dev_fill_forward_path with pppoe + bridge
When calling dev_fill_forward_path on a pppoe device, the provided destination address is invalid. In order for the bridge fdb lookup to succeed, the pppoe code needs to update ctx->daddr to the correct value. Fix this by storing the address inside struct net_device_path_ctx Fixes: f6efc675c9dd ("net: ppp: resolve forwarding path for bridge pppoe devices") Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1461c2d9dec8..2771fd22dc6a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -681,11 +681,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;