Page MenuHomeFreeBSD

ping: Fix an uninitialized variable
ClosedPublic

Authored by jlduran on Mar 23 2023, 8:23 PM.
Tags
None
Referenced Files
F102595117: D39233.diff
Thu, Nov 14, 1:36 PM
Unknown Object (File)
Sun, Nov 10, 5:02 PM
Unknown Object (File)
Wed, Nov 6, 3:53 PM
Unknown Object (File)
Wed, Nov 6, 3:53 PM
Unknown Object (File)
Wed, Nov 6, 3:53 PM
Unknown Object (File)
Wed, Nov 6, 3:53 PM
Unknown Object (File)
Tue, Nov 5, 3:13 AM
Unknown Object (File)
Tue, Oct 29, 8:38 AM

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#893286, @jlduran_gmail.com 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.

In D39233#893290, @cy wrote:
In D39233#893286, @jlduran_gmail.com 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 edited the summary of this revision. (Show Details)
  • Move the tests to a separate commit
  • Drop style(9) changes
jlduran removed a reviewer: tests.
jlduran edited the test plan for this revision. (Show Details)
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.