Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firewall: Improve the comments (documentation) #21862

Merged
merged 3 commits into from Jan 18, 2017
Merged

Conversation

primeos
Copy link
Member

@primeos primeos commented Jan 13, 2017

Motivation for this change

Mainly some improvements to the comments, refactoring of the "documentation" and minor fixes (code and typos):

Optional: Some questions about the file formatting:

  • Are there some official conventions we use for nixpkgs?
  • This file uses two spaces between sentences. Why? (GNU/Emacs/19th Century (American) typist/typewriter convention)
  • This file seems to wrap lines at about 72 characters (instead of e.g. 80) - is that correct?.

I'll make an issue (see #21974) to collect all my technical and controversial changes before opening PRs for them.

@mention-bot
Copy link

@primeos, thanks for your PR! By analyzing the history of the files in this pull request, we identified @wkennington, @edolstra and @fpletz to be potential reviewers.

@domenkozar
Copy link
Member

Experience so far shows that PRs are merged faster if fragmented :)

@primeos primeos force-pushed the firewall branch 2 times, most recently from d5e83ce to d191029 Compare January 14, 2017 15:36
@primeos primeos changed the title [RFC] Refactor the firewall firewall: Improve the comments (documentation) Jan 14, 2017
@@ -1,20 +1,31 @@
/* This module enables a simple firewall.

The firewall can be customised in arbitrary ways by setting
The firewall can be customized in arbitrary ways by setting
Copy link
Member

Choose a reason for hiding this comment

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

No reason to change British to US spelling...

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, my bad, I wasn't aware of the British spelling...

FW_REFUSE was removed and nixos-fw-input was renamed to nixos-fw.
additional logging, or want to reject certain packets anyway, you
can insert rules at the start of this chain.
- ‘nixos-fw-rpfilter’ is used as the main chain in the raw table,
called from the build-in ‘PREROUTING’ chain. If the kernel supports it
Copy link
Member

Choose a reason for hiding this comment

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

"build-in" -> "built-in"

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, thanks 😄

Order the chains of the main table alphabetically (like in the rest of
the file) and add nixos-fw-rpfilter (from the raw table) and nixos-drop
(used while reloading the firewall).
- Move some attributes to the top for better visibility (that should
  hopefully make it easier to read and understand this module without
  jumping around too much).
- Add some missing examples and improve some descriptions.
- Reorder the mkOption attributes for consistency.
- Wrap lines at 72 characters.
- Use two spaces between sentences.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants