Static binding not reserved ?

Open
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
networking

Research direction

Start at the _selectAdress function and inspect how static bindings, leases, and known addresses are handled; review the static configuration option, including when it is a function. Determine which reservation behavior is chosen, then verify that a statically bound address cannot be incorrectly allocated to another client.

Written by the indexing model from the issue text.

Description

It seems that the static bindings are not "reserved".
In the _selectAdress function, if a static binding exists, then the IP is returned, but it's never checked if the IP is already in lease or not.

Two possibilities to solve :

  • Let the static return like that, but if the address is already in lease, force the client who owns this address to change (renew)

  • Get all the static addresses and add them in the "known addresses" so that it is reserved to the binded MAC, something like :

for(var bind in static) {
    ips.push(static[bind]);
}

This solution seems impossible if the static option in the config is a function ...

Let me know if I'm wrong on this issue.

Dominant language
TypeScript
Stars
313
Forks
70
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rawify/dhcp.js

All issues in rawify/dhcp.js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.