Page MenuHomeVyOS Platform

Wrong dhcp-server static route subnet bytes
Closed, ResolvedPublicBUG


Network bytes calculated wrong here:

if the network_address (with /24 netmask) is 10.10.0.X or 10.0.10.X, the resulted string will be same: "10, 10,"


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible

Event Timeline

Here is a solution (based from

# add network bytes
if net.prefixlen:
    width = net.prefixlen // 8
    if net.prefixlen % 8:
        width += 1
    string += ','.join(map(str,tuple(net.network_address.packed)[:width])) + ','
dmbaturin changed Why the issue appeared? from Will be filled on close to Implementation mistake.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin claimed this task.