-
Notifications
You must be signed in to change notification settings - Fork 0
Backport BOOTP from systemd/main (v257-8) to debian/systemd v252 Bookworm .deb #1
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
base: agd-debian/252.31-1_deb12u1-base
Are you sure you want to change the base?
Conversation
@@ -883,7 +906,7 @@ static int client_message_init( | |||
*/ | |||
/* RFC7844 section 3: | |||
SHOULD NOT contain any other option. */ | |||
if (!client->anonymize && IN_SET(type, DHCP_DISCOVER, DHCP_REQUEST)) { | |||
if (!client->bootp && !client->anonymize && IN_SET(type, DHCP_DISCOVER, DHCP_REQUEST)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a style choice but it looks like this block and the one on 861 could all be inside the if
block on 814? Alternately you could add !client->bootp
to the if
blocks on lines on 819 and 838 - that would not be my first choice unless your goal is to minimize the diff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you are right, nice catch. It wasn't always like that, there was a big refactor towards the end after I discovered that my initial attempt at keeping things simple... wasn't.
I'll give this a try. There's a part of me that's loathe to go back to that stage, rebuild, and then do significant verification. But logically it kinda seems like it's pretty straight forward that the logic is identical and short of seeing it compile I don't really need to retest anything.
if (client->bootp) | ||
if (optoffset < 60 && optlen >= 60) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condense this down to a single if
?
Note, sd-dhcp-client.c is really a wholesale reimplementation of the original, not simply a merge or an automated patch. This was necessary because the code in that file had been heavily refactored between systemd v252 and v257.
This update is not necessarily final, since the feature has not yet been merged to systemd/main.