Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: DHCPv6 does not respect prefix assigned to interface (<=/64) #199

Open
xvzf opened this issue Jun 12, 2023 · 5 comments · May be fixed by #219
Open

bug: DHCPv6 does not respect prefix assigned to interface (<=/64) #199

xvzf opened this issue Jun 12, 2023 · 5 comments · May be fixed by #219

Comments

@xvzf
Copy link

xvzf commented Jun 12, 2023

When odhcpd hands out IPv6 leases on an interface with a prefix <=/64 (e.g. /96), leases can (and often are) outside of the allocated /96 on the interface.
I've looked a bit at the code and it seems the host_id calculation always infers 64bit, thus a /64 prefix. I would've expected odhcpd in DHCPv6 server mode, to actually respect the assigned prefix.

Are you open PR to fix this?

@dguglielmi
Copy link

Same issue for me with a /96. @xvzf I saw you close your PR, but your patch work great for me (Except for a typo "return return 0;". Is it safe to use it ?

@xvzf
Copy link
Author

xvzf commented Apr 29, 2024

yeah, I've been using it since a while - I'll fix the upstream PR and will re-open it 🤞

xvzf added a commit to xvzf/odhcpd that referenced this issue Apr 29, 2024
@xvzf
Copy link
Author

xvzf commented May 1, 2024

@dguglielmi feel free to upvote the PR/ comment you tested it - might help getting this upstream

@xvzf xvzf changed the title DHCPv6 does not respect prefix assigned to interface (<=/64) bug: DHCPv6 does not respect prefix assigned to interface (<=/64) May 1, 2024
@Magissia
Copy link

I'm currently trying to split my /64 ULA into multiple /112 (per VLAN), is this patch supposed to help with that? If yes, how can I test it?

Currently, setting the interface to a /112 prefix (option ip6assign '112'), the interface gets no IPv6 at all.

@xvzf
Copy link
Author

xvzf commented Jul 26, 2024

No, this PR only fixes an issue where addresses were assigned in the broader /64 prefix, even though the interface is only a /112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants