Backport BOOTP from systemd/main (v257-8) to debian/systemd v252 Bookworm .deb#1
Open
avramd wants to merge 5 commits intoagd-debian/252.31-1_deb12u1-basefrom
Open
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
avramd wants to merge 5 commits intoagd-debian/252.31-1_deb12u1-basefrom
Conversation
avramd
added a commit
that referenced
this pull request
Jan 9, 2025
avramd
commented
Jan 13, 2025
| offer->siaddr, | ||
| lease->server_address); | ||
|
|
||
| lease->server_address = offer->siaddr || lease->server_address; |
Owner
Author
There was a problem hiding this comment.
Suggested change
| lease->server_address = offer->siaddr || lease->server_address; | |
| lease->server_address = offer->siaddr ? offer->siaddr : lease->server_address; |
|| in C returns 0 or 1, not any of its operands
| client->client_id_len); | ||
| // For BOOTP packets, we already did all this when processing it as an offer | ||
| if (client->bootp) | ||
| lease = client->lease; |
Owner
Author
There was a problem hiding this comment.
This is the beginning of the bad gateway bug. I'm reusing the existing lease data structure that's a member of the client structure. By itself this isn't bad.
But look at lines 1666-1673 (not part of the diff, you'll have to expand). It discards client->lease and replaces it with lease. If they are the same memory location, then it's bad 🤣
c19b838 to
a530067
Compare
a530067 to
c78889b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.