Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 504
    • Issues 504
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 52
    • Merge requests 52
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #1374

Closed
Open
Created Aug 06, 2020 by Wlodzimierz Wencel@wlodekMaintainer

flexible option hook is creating string options differently than kea core

Test case is very simple, configuration as follows:

{
    "Dhcp6": {
        "hooks-libraries": [
            {
                "library": "/home/wlodek/installed/git-thread/lib/kea/hooks/libdhcp_flex_option.so", 
                "parameters": {
                    "options": [
                        {
                            "code": 41, 
                            "supersede": "ifelse(relay6[0].peeraddr == 3000::1005, 'EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00','')"
                        }
                    ]
                }
            }
        ], 
        "interfaces-config": {
            "interfaces": [
                "enp0s9"
            ]
        }, 
        "lease-database": {
            "type": "memfile"
        }, 
        "loggers": [
            {
                "debuglevel": 99, 
                "name": "kea-dhcp6", 
                "output_options": [
                    {
                        "output": "/home/wlodek/installed/git-thread/var/log/kea.log"
                    }
                ], 
                "severity": "DEBUG"
            }
        ], 
        "multi-threading": {
            "enable-multi-threading": true, 
            "packet-queue-size": 16, 
            "thread-pool-size": 2
        }, 
        "option-data": [
            {
                "code": 41, 
                "csv-format": true, 
                "data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00", 
                "name": "new-posix-timezone", 
                "space": "dhcp6"
            }
        ], 
        "preferred-lifetime": 3000, 
        "rebind-timer": 2000, 
        "renew-timer": 1000, 
        "shared-networks": [], 
        "subnet6": [
            {
                "interface": "enp0s9", 
                "pools": [
                    {
                        "pool": "2001:db8:1::1-2001:db8:1::1"
                    }
                ], 
                "subnet": "2001:db8:1::/64"
            }
        ], 
        "valid-lifetime": 4000
    }
}

We have configured option "new-posix-timezone" at global level and in flexible option, with the same value!

And I'm sending two advertise (inside Relay Forward), one message has peeraddr == 3000::1005 other don't. Kea is configured in a way that those two reply messages should be identical, but string in option that is created by hook has not escaped commas. Which is inconsistent behaviour with kea core. I'm adding capture from this test.

capture.pcap

Edited Aug 06, 2020 by Wlodzimierz Wencel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking