Skip to content

Conversation

@jkroonza
Copy link
Contributor

As it turns out some (I won't mention names) routers ends up using LL addresses when originating IPv6 traffic in the absense of IA_NA issued address (In spite of having IA_PD space available). This allows the DHCPv6 server to issue same and have routing function.

@jkroonza
Copy link
Contributor Author

For what it's worth: Already in production.

@Neustradamus
Copy link
Member

@paulusmack: Have you seen this @jkroonza PR?

@jkroonza jkroonza force-pushed the dhcpv6-na-support branch 2 times, most recently from 44b5414 to 5ed3ad3 Compare October 20, 2025 10:46
switch (opttype) {
case DHCPv6_OPTION_IAPREFIX:
if (optlen < 9 || optlen < 9 + (bfr[8] + 7) / 8) {
error("DHCPv6 relay: IA_PD option from server needs at least 9 (up to 20) "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this needs fixing, bfr[8] is only available if optlen >=9.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the if is OK but the error() call needs to be more careful.

@Neustradamus
Copy link
Member

@paulusmack: @jkroonza has done the change quickly! :)
What do you think now?

As it turns out some (I won't mention names) routers ends up using LL
addresses when originating IPv6 traffic in the absense of IA_NA issued
address (In spite of having IA_PD space available).  This allows the
DHCPv6 server to issue same and have routing function.

Include some extra safeties too for processing IA_PD server responses as
well.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
@jkroonza
Copy link
Contributor Author

That and fixed a typo in the validation checks that was copy&pasted back to IA_PD ...

@paulusmack paulusmack merged commit 13291f4 into ppp-project:master Oct 25, 2025
31 checks passed
@Neustradamus Neustradamus removed the request for review from paulusmack October 25, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants