1 From: Pablo Neira Ayuso <pablo@netfilter.org>
2 Date: Wed, 24 Mar 2021 02:30:50 +0100
3 Subject: [PATCH] netfilter: flowtable: support for
6 Add a PPPoE push action if layer 2 protocol is ETH_P_PPP_SES to add
7 PPPoE flowtable hardware offload support.
9 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 --- a/net/netfilter/nf_flow_table_offload.c
13 +++ b/net/netfilter/nf_flow_table_offload.c
14 @@ -600,9 +600,18 @@ nf_flow_rule_route_common(struct net *ne
17 entry = flow_action_entry_next(flow_rule);
18 - entry->id = FLOW_ACTION_VLAN_PUSH;
19 - entry->vlan.vid = other_tuple->encap[i].id;
20 - entry->vlan.proto = other_tuple->encap[i].proto;
22 + switch (other_tuple->encap[i].proto) {
23 + case htons(ETH_P_PPP_SES):
24 + entry->id = FLOW_ACTION_PPPOE_PUSH;
25 + entry->pppoe.sid = other_tuple->encap[i].id;
27 + case htons(ETH_P_8021Q):
28 + entry->id = FLOW_ACTION_VLAN_PUSH;
29 + entry->vlan.vid = other_tuple->encap[i].id;
30 + entry->vlan.proto = other_tuple->encap[i].proto;