Skip to content

Commit

Permalink
Decrement TTL after IngressACL. (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoshiuan authored Jul 12, 2024
1 parent 412064a commit 2c43824
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions dataplane/saiserver/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ func getPreIngressPipeline() []*fwdpb.ActionDesc {

func getL3Pipeline() []*fwdpb.ActionDesc {
return []*fwdpb.ActionDesc{
fwdconfig.Action(fwdconfig.DecapAction(fwdpb.PacketHeaderId_PACKET_HEADER_ID_ETHERNET)).Build(), // Decap L2 header.
fwdconfig.Action(fwdconfig.LookupAction(IngressActionTable)).Build(), // Run ingress action.
fwdconfig.Action(fwdconfig.LookupAction(FIBSelectorTable)).Build(), // Lookup in FIB.
fwdconfig.Action(fwdconfig.EncapAction(fwdpb.PacketHeaderId_PACKET_HEADER_ID_ETHERNET)).Build(), // Encap L2 header.
fwdconfig.Action(fwdconfig.LookupAction(outputIfaceTable)).Build(), // Match interface to port
fwdconfig.Action(fwdconfig.LookupAction(NeighborTable)).Build(), // Lookup in the neighbor table.
fwdconfig.Action(fwdconfig.DecapAction(fwdpb.PacketHeaderId_PACKET_HEADER_ID_ETHERNET)).Build(), // Decap L2 header.
fwdconfig.Action(fwdconfig.LookupAction(IngressActionTable)).Build(), // Run ingress action.
fwdconfig.Action(fwdconfig.UpdateAction(fwdpb.UpdateType_UPDATE_TYPE_DEC, fwdpb.PacketFieldNum_PACKET_FIELD_NUM_IP_HOP).WithValue([]byte{0x1})).Build(), // Decrement TTL.
fwdconfig.Action(fwdconfig.LookupAction(FIBSelectorTable)).Build(), // Lookup in FIB.
fwdconfig.Action(fwdconfig.EncapAction(fwdpb.PacketHeaderId_PACKET_HEADER_ID_ETHERNET)).Build(), // Encap L2 header.
fwdconfig.Action(fwdconfig.LookupAction(outputIfaceTable)).Build(), // Match interface to port
fwdconfig.Action(fwdconfig.LookupAction(NeighborTable)).Build(), // Lookup in the neighbor table.
}
}

Expand Down

0 comments on commit 2c43824

Please sign in to comment.