Backport BOOTP from systemd/main (v257-8) to debian/systemd v252 Bookworm .deb#1
Backport BOOTP from systemd/main (v257-8) to debian/systemd v252 Bookworm .deb#1avramd wants to merge 5 commits intoagd-debian/252.31-1_deb12u1-basefrom
Conversation
| /* 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.
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.
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) { |
Note, the changes in
sd-dhcp-client.cconstitute a wholesale reimplementation of the original change, 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.