Skip to content

Ripmcs detox#232

Closed
dkfellows wants to merge 12 commits into
masterfrom
ripmcs-detox
Closed

Ripmcs detox#232
dkfellows wants to merge 12 commits into
masterfrom
ripmcs-detox

Conversation

@dkfellows

Copy link
Copy Markdown
Member

This detoxifies the C code for the “reverse iptag multicast source” so that it stops using random bit bashing and instead just uses simple patterns via vetted macros. This addresses a few bugs in the process where there were things wrong that we just happened to never hit in practice. I don't think it is a good idea for code to have such surprise “mines” in them, waiting to trip up random passing ships.

I guess quite a few of the macros (but not all) could be replaced by inlined functions. (The UINT macro can't work that way, but I suspect most of the others are convertible.)

@dkfellows dkfellows added the enhancement This adds a new feature label Nov 21, 2017

@rowleya rowleya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally fine. There are a couple of issues marked in the code. The following issues also exist throughout:

  • Spaces have been replaced with tabs; this looks bad even in github.
  • Functions have the inline brace replaced by one on the next line. This is inconsistent with the style in the rest of the code

} else {
header_size += 4;
}
if (test_bit(!pkt_type, EIEIO_PKT_32BIT)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I see this. EIEIO_PKT_32BIT = 1.

If pkt_type = 1, test_bit(!1, 1) == test_bit(0, 1) == FALSE I think. So this will fail to detect pkt_type == 1.

}

if (pkt_type <= 1) {
if (!test_bit(pkt_type, EIEIO_PKT_32BIT)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This again looks suspicious

@alan-stokes

Copy link
Copy Markdown
Contributor

leaving to rowley review

@alan-stokes

Copy link
Copy Markdown
Contributor

still leaving, as it seems has outstnading issues from rowley

@alan-stokes alan-stokes added this to the Bluesky milestone May 2, 2018
@dkfellows

Copy link
Copy Markdown
Member Author

#462 effectively supersedes this

@dkfellows dkfellows closed this Aug 1, 2019
@alan-stokes

Copy link
Copy Markdown
Contributor

keeping branch for any reason??

@dkfellows

Copy link
Copy Markdown
Member Author

The parts not in #462 are even better handled in #613 so this can go totally now.

@dkfellows dkfellows deleted the ripmcs-detox branch July 16, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants