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

elbandi created this task.Feb 22 2020, 11:51 AM
pasik added a subscriber: pasik.Feb 23 2020, 10:23 AM
elbandi added a comment.EditedMar 3 2020, 12:29 AM

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 closed this task as Resolved.Thu, Jun 25, 7:52 AM
dmbaturin claimed this task.