Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Kea
Kea
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 445
    • Issues 445
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 71
    • Merge Requests 71
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #1640

Closed
Open
Opened Jan 11, 2021 by Tomek Mrugalski@tomek🛰Owner

OptionDataDef uses raw pointers (should be strings or smartptrs)

The following structures use raw pointers in src/lib/dhcp/option_data_types.h:

struct OptionDefParams {
    const char*             name;           // option name
    uint16_t                code;           // option code
    const char*             space;          // option space
    OptionDataType          type;           // data type
    bool                    array;          // is array
    const OptionDataType*   records;        // record fields
    size_t                  records_size;   // number of fields in a record
    const char*             encapsulates;   // option space encapsulated by the
                                            // particular option.
};

/// @brief Encapsulation of option definition parameters and the structure size.
struct OptionDefParamsEncapsulation {
    const struct OptionDefParams*   optionDefParams;    // parameters structure
    const int                       size;               // structure size
    const char*                     space;              // option space
};

Those structures should be converted to a safer approach - either plain std::string or a smartptr if some data sharing is needed.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Kea1.9-backlog
Milestone
Kea1.9-backlog
Assign milestone
Time tracking
None
Due date
None
Reference: isc-projects/kea#1640