Page MenuHomeFreeBSD

ping: Fix an uninitialized variable
ClosedPublic

Authored by jlduran_gmail.com on Mar 23 2023, 8:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 6, 12:47 AM
Unknown Object (File)
Sun, Apr 21, 7:42 AM
Unknown Object (File)
Sat, Apr 20, 11:47 PM
Unknown Object (File)
Mar 16 2024, 4:49 AM
Unknown Object (File)
Mar 12 2024, 9:22 PM
Unknown Object (File)
Mar 12 2024, 9:22 PM
Unknown Object (File)
Mar 12 2024, 9:22 PM
Unknown Object (File)
Mar 11 2024, 10:39 PM

Details

Summary

The variable oicmp, which holds the original ("quoted packet") ICMP packet in a structured way, did not have a copy of the original ICMP packet obtained from the raw data.
The code was accidentally removed in 20b41303140eee4dfb896558fb83600c5f013d39.
Bring it back.

Reported by: Coverity Scan, cy
CID:
Fixes: 20b41303140eee4dfb896558fb83600c5f013d39
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested changes to this revision.Mar 23 2023, 10:09 PM

Jumbo commits are discouraged. Can you break this revision into three, please.

One to fix the error.

Another to fix the regression.

A third to fix style(9) + whitespace changes.

This revision now requires changes to proceed.Mar 23 2023, 10:09 PM
In D39233#893278, @cy wrote:

Jumbo commits are discouraged. Can you break this revision into three, please.

One to fix the error.

Another to fix the regression.

A third to fix style(9) + whitespace changes.

Will do. In that case, I have a commit just to fix style for the entire file (will be submitted after 13.2-RELEASE, as requested).

In D39233#893278, @cy wrote:

Jumbo commits are discouraged. Can you break this revision into three, please.

One to fix the error.

Another to fix the regression.

A third to fix style(9) + whitespace changes.

Will do. In that case, I have a commit just to fix style for the entire file (will be submitted after 13.2-RELEASE, as requested).

Typically what I do is create a git branch and do all my commits there. Sometimes I will submit the reviews separately or if it loses context I submit one review, stating that the one review will be commmitted using N commits.

In D39233#893290, @cy wrote:
In D39233#893278, @cy wrote:

Jumbo commits are discouraged. Can you break this revision into three, please.

One to fix the error.

Another to fix the regression.

A third to fix style(9) + whitespace changes.

Will do. In that case, I have a commit just to fix style for the entire file (will be submitted after 13.2-RELEASE, as requested).

Typically what I do is create a git branch and do all my commits there. Sometimes I will submit the reviews separately or if it loses context I submit one review, stating that the one review will be commmitted using N commits.

Yes, it’s on https://github.com/jlduran/freebsd-src/commits/ping-fix-20b4130. However, I’d like to clean it up a little. Tomorrow will do. Thank you!

jlduran_gmail.com edited the summary of this revision. (Show Details)
  • Move the tests to a separate commit
  • Drop style(9) changes
This revision is now accepted and ready to land.Mar 24 2023, 4:46 AM
This revision was automatically updated to reflect the committed changes.