mirror of
https://github.com/vishvananda/netlink.git
synced 2025-09-26 20:01:13 +08:00
pedit: Fix EncodeActions to add TcGen for pedit action
TcGen was missing in pedit action and the kernel cannont correctly process pedit action. Signed-off-by: Chen Tang <tangchen.1@bytedance.com>
This commit is contained in:
@@ -752,6 +752,7 @@ func EncodeActions(attr *nl.RtAttr, actions []Action) error {
|
||||
table := attr.AddRtAttr(tabIndex, nil)
|
||||
tabIndex++
|
||||
pedit := nl.TcPedit{}
|
||||
toTcGen(action.Attrs(), &pedit.Sel.TcGen)
|
||||
if action.SrcMacAddr != nil {
|
||||
pedit.SetEthSrc(action.SrcMacAddr)
|
||||
}
|
||||
|
Reference in New Issue
Block a user