]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nft_flow_offload: fix offload with pppoe + vlan
authorFelix Fietkau <nbd@nbd.name>
Mon, 9 May 2022 12:26:16 +0000 (14:26 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 16 May 2022 10:58:55 +0000 (12:58 +0200)
When running a combination of PPPoE on top of a VLAN, we need to set
info->outdev to the PPPoE device, otherwise PPPoE encap is skipped
during software offload.

Fixes: 83061518236c ("netfilter: flowtable: add pppoe support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_flow_offload.c

index d88de26aad758b740af72b74d897f857f4a468b2..187b8cb9a5103db4405acf2cf99aa0c0ed8bd237 100644 (file)
@@ -123,7 +123,8 @@ static void nft_dev_path_info(const struct net_device_path_stack *stack,
                                info->indev = NULL;
                                break;
                        }
-                       info->outdev = path->dev;
+                       if (!info->outdev)
+                               info->outdev = path->dev;
                        info->encap[info->num_encaps].id = path->encap.id;
                        info->encap[info->num_encaps].proto = path->encap.proto;
                        info->num_encaps++;