dhcpleased and option 121/classless-static-routes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dhcpleased and option 121/classless-static-routes

Uwe Werler-4
>Synopsis: no default route added when dhcp option 121 set
>Category: system
>Environment:
        System      : OpenBSD 6.9
        Details     : OpenBSD 6.9 (GENERIC.MP) #12: Tue Apr  6 15:41:46 GMT 2021
                         uwe@FT-GV164M2:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
        When option classless-static-routes is set at the dhcp server no
routes are added at all, neither the additional routes nor the default route.
>How-To-Repeat:

define a subnet in dhcpd.conf like that:

subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers 192.168.1.1;
        option classless-static-routes 0/0 192.168.1.1, 192.168.2.0/24 192.168.1.2;
...
}
       

>Fix:
        Without option 121 the default route is set.


dmesg:
OpenBSD 6.9 (GENERIC.MP) #12: Tue Apr  6 15:41:46 GMT 2021
    uwe@FT-GV164M2:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17018589184 (16230MB)
avail mem = 16487419904 (15723MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xeab60 (103 entries)
bios0: vendor Dell Inc. version "1.16.1" date 10/03/2019
bios0: Dell Inc. Latitude 7480
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT SSDT HPET SSDT UEFI SSDT LPIT SSDT SSDT SSDT SSDT DBGP DBG2 SSDT MSDM SLIC DMAR TPM2 ASF! BGRT
acpi0: wakeup devices RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) PXSX(S4) RP13(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2295.62 MHz, 06-8e-09
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 24MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2294.67 MHz, 06-8e-09
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2294.66 MHz, 06-8e-09
cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2294.66 MHz, 06-8e-09
cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf0000000, bus 0-127
acpihpet0 at acpi0: 23999999 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus -1 (RP09)
acpiprt5 at acpi0: bus -1 (RP10)
acpiprt6 at acpi0: bus -1 (RP11)
acpiprt7 at acpi0: bus -1 (RP12)
acpiprt8 at acpi0: bus -1 (RP13)
acpiprt9 at acpi0: bus 1 (RP01)
acpiprt10 at acpi0: bus -1 (RP02)
acpiprt11 at acpi0: bus 2 (RP03)
acpiprt12 at acpi0: bus -1 (RP04)
acpiprt13 at acpi0: bus 3 (RP05)
acpiprt14 at acpi0: bus -1 (RP06)
acpiprt15 at acpi0: bus -1 (RP07)
acpiprt16 at acpi0: bus -1 (RP08)
acpiprt17 at acpi0: bus -1 (RP17)
acpiprt18 at acpi0: bus -1 (RP18)
acpiprt19 at acpi0: bus -1 (RP19)
acpiprt20 at acpi0: bus -1 (RP20)
acpiprt21 at acpi0: bus -1 (RP21)
acpiprt22 at acpi0: bus -1 (RP22)
acpiprt23 at acpi0: bus -1 (RP23)
acpiprt24 at acpi0: bus -1 (RP24)
acpiprt25 at acpi0: bus -1 (RP14)
acpiprt26 at acpi0: bus -1 (RP15)
acpiprt27 at acpi0: bus -1 (RP16)
acpiec0 at acpi0
acpiec at acpi0 not configured
acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
acpicmos0 at acpi0
"INT3403" at acpi0 not configured
"INT3403" at acpi0 not configured
"DLL07A0" at acpi0 not configured
"INT3446" at acpi0 not configured
"INT3403" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT33A1" at acpi0 not configured
"MSFT0101" at acpi0 not configured
"PNP0C14" at acpi0 not configured
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL PGFX464" serial 3640 type LION oem "SMP"
acpihid0 at acpi0: HIDD, 5 button array
"INT3400" at acpi0 not configured
acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: WRST
acpipwrres1 at acpi0: WRST
acpipwrres2 at acpi0: WRST
acpipwrres3 at acpi0: WRST
acpipwrres4 at acpi0: WRST
acpipwrres5 at acpi0: WRST
acpipwrres6 at acpi0: WRST
acpipwrres7 at acpi0: WRST
acpipwrres8 at acpi0: WRST
acpipwrres9 at acpi0: WRST
acpipwrres10 at acpi0: WRST
acpipwrres11 at acpi0: WRST
acpipwrres12 at acpi0: WRST
acpipwrres13 at acpi0: WRST
acpipwrres14 at acpi0: WRST
acpipwrres15 at acpi0: WRST
acpipwrres16 at acpi0: WRST
acpipwrres17 at acpi0: WRST
acpipwrres18 at acpi0: WRST
acpipwrres19 at acpi0: WRST
acpitz0 at acpi0: critical temperature is 107 degC
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCD_
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 2295 MHz: speeds: 2701, 2700, 2400, 2300, 2200, 2000, 1900, 1700, 1500, 1400, 1200, 1100, 900, 700, 600, 400 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 7G Host" rev 0x02
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 620" rev 0x02
drm0 at inteldrm0
inteldrm0: msi, KABYLAKE, gen 9
"Intel Core 6G Thermal" rev 0x02 at pci0 dev 4 function 0 not configured
xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
pchtemp0 at pci0 dev 20 function 2 "Intel 100 Series Thermal" rev 0x21
dwiic0 at pci0 dev 21 function 0 "Intel 100 Series I2C" rev 0x21: apic 2 int 16
iic0 at dwiic0
dwiic1 at pci0 dev 21 function 1 "Intel 100 Series I2C" rev 0x21: apic 2 int 17
iic1 at dwiic1
ihidev0 at iic1 addr 0x2c irq 51, vendor 0x44e product 0x120b, DLL07A0
ihidev0: 7 report ids
ims0 at ihidev0 reportid 1: 3 buttons, Z and W dir
wsmouse0 at ims0 mux 0
ikbd0 at ihidev0 reportid 2: 8 variable keys, 6 key codes
wskbd0 at ikbd0 mux 1
hid at ihidev0 reportid 3 not configured
hid at ihidev0 reportid 4 not configured
hid at ihidev0 reportid 5 not configured
hid at ihidev0 reportid 6 not configured
hid at ihidev0 reportid 7 not configured
dwiic2 at pci0 dev 21 function 2 "Intel 100 Series I2C" rev 0x21: apic 2 int 18
iic2 at dwiic2
"Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured
ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x21: msi, AHCI 1.3.1
ahci0: port 2: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 2 lun 0: <ATA, Micron 1100 SATA, M0D> naa.500a075119d7587b
sd0: 244198MB, 512 bytes/sector, 500118192 sectors, thin
ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi
pci1 at ppb0 bus 1
rtsx0 at pci1 dev 0 function 0 "Realtek RTS525A Card Reader" rev 0x01: msi
sdmmc0 at rtsx0: 4-bit, dma
ppb1 at pci0 dev 28 function 2 "Intel 100 Series PCIE" rev 0xf1: msi
pci2 at ppb1 bus 2
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x78, msi
ppb2 at pci0 dev 28 function 4 "Intel 100 Series PCIE" rev 0xf1: msi
pci3 at ppb2 bus 3
pcib0 at pci0 dev 31 function 0 "Intel 200 Series LPC" rev 0x21
"Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured
azalia0 at pci0 dev 31 function 3 "Intel 200 Series HD Audio" rev 0x21: msi
azalia0: codecs: Realtek ALC256, Intel/0x280b, using Realtek ALC256
audio0 at azalia0
ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21: apic 2 int 16
iic3 at ichiic0
spdmem0 at iic3 addr 0x50: 8GB DDR4 SDRAM PC4-19200 SO-DIMM
spdmem1 at iic3 addr 0x52: 8GB DDR4 SDRAM PC4-19200 SO-DIMM
em0 at pci0 dev 31 function 6 "Intel I219-LM" rev 0x21: msi, address a4:4c:c8:7e:52:d3
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd1 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
wsmouse1 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
uvideo0 at uhub0 port 5 configuration 1 interface 0 "CN0K49W1LOG007B8BMGNA01 Integrated_Webcam_HD" rev 2.00/75.24 addr 2
video0 at uvideo0
ugen0 at uhub0 port 7 "Intel Bluetooth" rev 2.00/0.10 addr 3
ugen1 at uhub0 port 10 "Broadcom Corp 5880" rev 1.10/1.01 addr 4
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd1: 244190MB, 512 bytes/sector, 500101898 sectors
root on sd1a (42a289e5051cfa2f.a) swap on sd1b dump on sd1b
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd1
wskbd0: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
iwm0: hw rev 0x230, fw ver 34.0.1, address 60:f6:77:bc:3a:04

usbdevs:
Controller /dev/usb0:
addr 01: 8086:0000 Intel, xHCI root hub
         super speed, self powered, config 1, rev 1.00
         driver: uhub0
addr 02: 0c45:6717 CN0K49W1LOG007B8BMGNA01, Integrated_Webcam_HD
         high speed, power 500 mA, config 1, rev 75.24
         driver: uvideo0
addr 03: 8087:0a2b Intel, Bluetooth
         full speed, self powered, config 1, rev 0.10
         driver: ugen0
addr 04: 0a5c:5832 Broadcom Corp, 5880
         full speed, power 100 mA, config 1, rev 1.01, iSerial 0123456789ABCD
         driver: ugen1

Reply | Threaded
Open this post in threaded view
|

Re: dhcpleased and option 121/classless-static-routes

Klemens Nanni-2
On Wed, Apr 07, 2021 at 11:16:44PM +0000, Uwe Werler wrote:

> >Synopsis: no default route added when dhcp option 121 set
> >Category: system
> >Environment:
> System      : OpenBSD 6.9
> Details     : OpenBSD 6.9 (GENERIC.MP) #12: Tue Apr  6 15:41:46 GMT 2021
> uwe@FT-GV164M2:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine     : amd64
> >Description:
> When option classless-static-routes is set at the dhcp server no
> routes are added at all, neither the additional routes nor the default route.
> >How-To-Repeat:
>
> define a subnet in dhcpd.conf like that:
>
> subnet 192.168.1.0 netmask 255.255.255.0 {
>         option routers 192.168.1.1;
>         option classless-static-routes 0/0 192.168.1.1, 192.168.2.0/24 192.168.1.2;
> ...
> }
>
>
> >Fix:
> Without option 121 the default route is set.
Two things:

1. dhcpleased(8) requests but then completely ignores dhcp-options(5)
   "classless-static-routes".

2. With "classless-static-routes" set in dhcpd.conf, dhcpd(8) omits
   "routers" in ACKs iff "classless-static-routes" was requested,
   following RFC 3442:

        DHCP Server Administrator Responsibilities

           Many clients may not implement the Classless Static Routes option.
           DHCP server administrators should therefore configure their DHCP
           servers to send both a Router option and a Classless Static Routes
           option, and should specify the default router(s) both in the Router
           option and in the Classless Static Routes option.

           When a DHCP client requests the Classless Static Routes option and
           also requests either or both of the Router option and the Static
           Routes option, and the DHCP server is sending Classless Static Routes
           options to that client, the server SHOULD NOT include the Router or
           Static Routes options.

With the same dhcpd.conf, not requesting "classless-static-routes" makes
dhcpd respond with both "routers" and "classless-static-routes".

I suggest dhcpleased shouldn't request the option until it actually
supports it so as to ensure a default route is still installed.

This fixes connectivity but not your option 121 use case -- for that
I'd recommend using dhclient(8) until dhcpleased grows support for it.

Feedback? Objections? OK?


Index: frontend.c
===================================================================
RCS file: /cvs/src/sbin/dhcpleased/frontend.c,v
retrieving revision 1.8
diff -u -p -r1.8 frontend.c
--- frontend.c 22 Mar 2021 16:28:25 -0000 1.8
+++ frontend.c 8 Apr 2021 05:30:14 -0000
@@ -776,9 +776,9 @@ build_packet(uint8_t message_type, uint3
  static uint8_t dhcp_client_id[] = {DHO_DHCP_CLIENT_IDENTIFIER, 7,
  HTYPE_ETHER, 0, 0, 0, 0, 0, 0};
  static uint8_t dhcp_req_list[] = {DHO_DHCP_PARAMETER_REQUEST_LIST,
- 8, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
+ 7, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
  DHO_HOST_NAME, DHO_DOMAIN_NAME, DHO_BROADCAST_ADDRESS,
- DHO_DOMAIN_SEARCH, DHO_CLASSLESS_STATIC_ROUTES};
+ DHO_DOMAIN_SEARCH};
  static uint8_t dhcp_requested_address[] = {DHO_DHCP_REQUESTED_ADDRESS,
  4, 0, 0, 0, 0};
  static uint8_t dhcp_server_identifier[] = {DHO_DHCP_SERVER_IDENTIFIER,

Reply | Threaded
Open this post in threaded view
|

Re: dhcpleased and option 121/classless-static-routes

Florian Obser-2
On Thu, Apr 08, 2021 at 07:47:52AM +0200, Klemens Nanni wrote:

> On Wed, Apr 07, 2021 at 11:16:44PM +0000, Uwe Werler wrote:
> > >Synopsis: no default route added when dhcp option 121 set
> > >Category: system
> > >Environment:
> > System      : OpenBSD 6.9
> > Details     : OpenBSD 6.9 (GENERIC.MP) #12: Tue Apr  6 15:41:46 GMT 2021
> > uwe@FT-GV164M2:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Architecture: OpenBSD.amd64
> > Machine     : amd64
> > >Description:
> > When option classless-static-routes is set at the dhcp server no
> > routes are added at all, neither the additional routes nor the default route.
> > >How-To-Repeat:
> >
> > define a subnet in dhcpd.conf like that:
> >
> > subnet 192.168.1.0 netmask 255.255.255.0 {
> >         option routers 192.168.1.1;
> >         option classless-static-routes 0/0 192.168.1.1, 192.168.2.0/24 192.168.1.2;
> > ...
> > }
> >
> >
> > >Fix:
> > Without option 121 the default route is set.
> Two things:
>
> 1. dhcpleased(8) requests but then completely ignores dhcp-options(5)
>    "classless-static-routes".
>
> 2. With "classless-static-routes" set in dhcpd.conf, dhcpd(8) omits
>    "routers" in ACKs iff "classless-static-routes" was requested,
>    following RFC 3442:
>
> DHCP Server Administrator Responsibilities
>
>   Many clients may not implement the Classless Static Routes option.
>   DHCP server administrators should therefore configure their DHCP
>   servers to send both a Router option and a Classless Static Routes
>   option, and should specify the default router(s) both in the Router
>   option and in the Classless Static Routes option.
>
>   When a DHCP client requests the Classless Static Routes option and
>   also requests either or both of the Router option and the Static
>   Routes option, and the DHCP server is sending Classless Static Routes
>   options to that client, the server SHOULD NOT include the Router or
>   Static Routes options.
>
> With the same dhcpd.conf, not requesting "classless-static-routes" makes
> dhcpd respond with both "routers" and "classless-static-routes".
>
> I suggest dhcpleased shouldn't request the option until it actually
> supports it so as to ensure a default route is still installed.
>
> This fixes connectivity but not your option 121 use case -- for that
> I'd recommend using dhclient(8) until dhcpleased grows support for it.
>
> Feedback? Objections? OK?
>

It's on my todo list to implement classless static routes but won't
make it for 6.9.

OK florian

>
> Index: frontend.c
> ===================================================================
> RCS file: /cvs/src/sbin/dhcpleased/frontend.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 frontend.c
> --- frontend.c 22 Mar 2021 16:28:25 -0000 1.8
> +++ frontend.c 8 Apr 2021 05:30:14 -0000
> @@ -776,9 +776,9 @@ build_packet(uint8_t message_type, uint3
>   static uint8_t dhcp_client_id[] = {DHO_DHCP_CLIENT_IDENTIFIER, 7,
>   HTYPE_ETHER, 0, 0, 0, 0, 0, 0};
>   static uint8_t dhcp_req_list[] = {DHO_DHCP_PARAMETER_REQUEST_LIST,
> - 8, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
> + 7, DHO_SUBNET_MASK, DHO_ROUTERS, DHO_DOMAIN_NAME_SERVERS,
>   DHO_HOST_NAME, DHO_DOMAIN_NAME, DHO_BROADCAST_ADDRESS,
> - DHO_DOMAIN_SEARCH, DHO_CLASSLESS_STATIC_ROUTES};
> + DHO_DOMAIN_SEARCH};
>   static uint8_t dhcp_requested_address[] = {DHO_DHCP_REQUESTED_ADDRESS,
>   4, 0, 0, 0, 0};
>   static uint8_t dhcp_server_identifier[] = {DHO_DHCP_SERVER_IDENTIFIER,
>

--
I'm not entirely sure you are real.