Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 committed Apr 4, 2024
1 parent 2162920 commit c85ef67
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dataplane/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,29 @@ func (d *Dataplane) Start(ctx context.Context, c gpb.GNMIClient, target string)
return err
}

// Allow all traffic to L3 processing.
hash := saipb.NewHashClient(conn)
hashResp, err := hash.CreateHash(context.Background(), &saipb.CreateHashRequest{
Switch: swResp.Oid,
NativeHashFieldList: []saipb.NativeHashField{
saipb.NativeHashField_NATIVE_HASH_FIELD_SRC_IP,
saipb.NativeHashField_NATIVE_HASH_FIELD_DST_IP,
saipb.NativeHashField_NATIVE_HASH_FIELD_L4_SRC_PORT,
saipb.NativeHashField_NATIVE_HASH_FIELD_L4_DST_PORT,
},
})
if err != nil {
return err
}
_, err = sw.SetSwitchAttribute(ctx, &saipb.SetSwitchAttributeRequest{
Oid: swResp.Oid,
EcmpHashIpv4: proto.Uint64(hashResp.Oid),
EcmpHashIpv6: proto.Uint64(hashResp.Oid),
})
if err != nil {
return err
}

// Allow all traffic to L3 processing.
mmc := saipb.NewMyMacClient(conn)
_, err = mmc.CreateMyMac(context.Background(), &saipb.CreateMyMacRequest{
Expand Down

0 comments on commit c85ef67

Please sign in to comment.