Skip to content

Commit 17e52c0

Browse files
ummakynesdavem330
authored andcommitted
netfilter: flowtable: support for FLOW_ACTION_PPPOE_PUSH
Add a PPPoE push action if layer 2 protocol is ETH_P_PPP_SES to add PPPoE flowtable hardware offload support. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 563ae55 commit 17e52c0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

net/netfilter/nf_flow_table_offload.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,18 @@ nf_flow_rule_route_common(struct net *net, const struct flow_offload *flow,
600600
continue;
601601

602602
entry = flow_action_entry_next(flow_rule);
603-
entry->id = FLOW_ACTION_VLAN_PUSH;
604-
entry->vlan.vid = other_tuple->encap[i].id;
605-
entry->vlan.proto = other_tuple->encap[i].proto;
603+
604+
switch (other_tuple->encap[i].proto) {
605+
case htons(ETH_P_PPP_SES):
606+
entry->id = FLOW_ACTION_PPPOE_PUSH;
607+
entry->pppoe.sid = other_tuple->encap[i].id;
608+
break;
609+
case htons(ETH_P_8021Q):
610+
entry->id = FLOW_ACTION_VLAN_PUSH;
611+
entry->vlan.vid = other_tuple->encap[i].id;
612+
entry->vlan.proto = other_tuple->encap[i].proto;
613+
break;
614+
}
606615
}
607616

608617
return 0;

0 commit comments

Comments
 (0)