Page MenuHomeVyOS Platform

1.5 Rolling - DHCP Option Failures - windows-static-route
Open, NormalPublicBUG

Description

Currently running 1.5-rolling-202401161743 (and didn't see any new commits addressing this since then), but the DHCP static-route option seems to be broken:

[edit service dhcp-server shared-network-name TRUSTED_WIRED_2 subnet 10.42.132.0/24]
user@fw1# set option static-route 10.42.0.0/16 next-hop 10.42.132.1
user@fw1# commit

This generates the following config:

--snip--
        "option-def": [
            {
                "name": "rfc3442-static-route",
                "code": 121,
                "type": "record",
                "array": true,
                "record-types": "uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8"
            },
            {
                "name": "windows-static-route",
                "code": 249,
                "type": "record",
                "array": true,
                "record-types": "uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8"
            },
--snip--
{
        "name": "TRUSTED_WIRED_2",
        "authoritative": false,
        "subnet4": [
            {
                "subnet": "10.42.132.0/24",
                "id": 132,
                "option-data": [
                    {
                        "name": "domain-name-servers",
                        "data": "10.42.201.11, 8.8.8.8"
                    },
                    {
                        "name": "domain-name",
                        "data": "somedomain.com"
                    },
                    {
                        "name": "routers",
                        "data": "10.42.132.1"
                    },
                    {
                        "name": "rfc3442-static-route",
                        "data": "16,10,42,10,42,132,1, 0,10,42,132,1"
                    },
                    {
                        "name": "windows-static-route",
                        "data": "16,10,42,10,42,132,1"
                    }
                ],
                "valid-lifetime": 86400,
                "max-valid-lifetime": 86400,
                "pools": [
                    {
                        "pool": "10.42.132.10 - 10.42.132.250"
                    }
                ]
            }
        ]
    },
--snip--

This config is missing info and causes Kea to fail to start:

Feb  9 16:48:49 fw1 kea-dhcp4[351623]: 2024-02-09 16:48:49.217 ERROR [kea-dhcp4.dhcp4/351623.140241652218304] DHCP4_PARSER_FAIL failed to create or run parser for configuration element shared-networks: option data does not match option definition (space: dhcp4, code: 249): number of data fields for the option type '249' is greater than number of values provided. (/run/kea/kea-dhcp4.conf:565:33)
Feb  9 16:48:49 fw1 kea-dhcp4[351623]: 2024-02-09 16:48:49.218 ERROR [kea-dhcp4.dhcp4/351623.140241652218304] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /run/kea/kea-dhcp4.conf, reason: option data does not match option definition (space: dhcp4, code: 249): number of data fields for the option type '249' is greater than number of values provided. (/run/kea/kea-dhcp4.conf:565:33)
Feb  9 16:48:49 fw1 kea-dhcp4[351623]: 2024-02-09 16:48:49.218 ERROR [kea-dhcp4.dhcp4/351623.140241652218304] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/run/kea/kea-dhcp4.conf': option data does not match option definition (space: dhcp4, code: 249): number of data fields for the option type '249' is greater than number of values provided. (/run/kea/kea-dhcp4.conf:565:33)

Doesn't seem to have changed in the past few weeks, but I'm not 100% sure why it's not generating enough info for the windows-static-route bit. Current branch as of today:

https://github.com/vyos/vyos-1x/blob/ffca244d5c38655ce915cee373e3d6f6c9292954/python/vyos/kea.py#L85-L86

Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202401161743
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)