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

Remove PF_Ring Submodule #57

Merged
merged 59 commits into from
Jul 12, 2021
Merged

Remove PF_Ring Submodule #57

merged 59 commits into from
Jul 12, 2021

Conversation

jmwample
Copy link
Member

@jmwample jmwample commented Nov 14, 2020

Issue

Using PF_Ring as a submodule and compiling the detector using static libraries is limiting.

Solution

Install PF_Ring as a dependency on the station and then link against libpfring/libpcap shared object files. This way we can more easily package and distribute station code without managing pf_ring kernel module.

TODO

  • Compile using PF_Ring shared object files
  • Test which PF_Ring versions are compatible with current station code
  • Modify .github/workflows/build.yml to use new build process.

  • Update Readme for install instructions
  • Update sysconfig references from dark-decoy to conjure
  • Create a test release

@jmwample
Copy link
Member Author

PF_Ring provides packaged installation options from 7.5 onward. Current default installed by apt is 7.8

Tested successful station compilation:

  • 6.4.0-stable (from source)
  • 7.2.0-stable (from source)
  • 7.4.0-stable (from source)
  • 7.8.0-stable (from package)

jmwample and others added 21 commits December 3, 2020 11:15
…PI (#59)

* updated wrapping struct for clientToStations and added a flag to registrations for presccanned

* rust compilation issue fixed
* Update detector to send source/decoy addresses to the application over the C2S struct

* log addresses during new registration in application

* implementatoin, but not integrated yet.

* updated addrs, added small tests, implemented check in registration pipeline.

* added checks for nil pointers to prevent crashes and switched to checking Covert which is what this should have been from the start.

* rust compile warning fixes.

* added logging for registrations dropped by blocklist. parse hostport covert format which should always be received from client
* Implemented and tested in golang tests, not yet tested in staging

* added validity tag and tracking function to registration manager to track (and check tracking of) new registrations immediately

* fixed mutex deadlock created by calling registrationExists from register, minor fixes. tested in staging - working
* add option to moderate client ip logging, default off

* added option parse and client ip logging in registration API

* fixed mistake and removed last client IPs and covert logging

* race condition in registration tracking resulted in small data structure refactor. All regs tracking and retiring properly
Although we don't technically care about closing the sockets (as
the program will run until either all sockets fail or the process
dies), the Go GC will collect the sockets if there isn't some
reference to them; these defers retain that reference so they aren't
collected.
* update to prevent zmq_proxy crash and to limit concurrent TCP socket use by liveness tests. also allows disable of v4 or v6 to limit unused registrations

* fixes deadlock in most conditions. seems to still lock when all TCP sockets get used up.

* dial liveness with timeout so that connections close and goroutines return in an expected amount of time.
* change removeOldRegistrations to only block intermittently instead of whollistically

* tested working on single station staging

* typo
* limit connection logging, and limit redis reconnections

* update covert Blocklist to include domains and valid addresses for golang TCP dial

* exercising redis usage through multithreaded testing

* updated pubsub send on golang application side and pubsub receive on detector side with tests

* checkpoint

* validated reg API client address handling behavior with testing

* updated tests and client address handling in application

* If client registers with v6, only create and track registrations for IPv6

* prevent client Address logging and only add v6 registration when client registers using v6

* ensure that a client who registers with v4 will propogate registrations for both v4 and v6, but a client who registers with v6 only propogates v6

* client ip logging based on env var in session logging

* invalidate registrations sent over v6 if they pick a v4 phantom address

* small enhancements to logging

* added loging if zmq_proxy escapes work loops
* Fix ZMQ race condition from proxy

* Add test for concurrency on ZMQ proxy
ewust and others added 9 commits March 20, 2021 12:09
* Make halfPipe log both up and down stats

* Add stats tracking and periodic reporting
* Make halfPipe log both up and down stats

* Add stats tracking and periodic reporting

* break up read/writes so we can track bytes as they are transferred, not just at the end of the connection

* track new instead of absolute local/api regs

* Correct detection for local registrations

Co-authored-by: Jack Wampler <jmwample@users.noreply.github.com>
* add external file to manage subnet generations so we don't have to rebuild the station to update subnets in use.

* parsing error in V6Only subnet functor filter

* parsing error in V6Only subnet functor filter

* more test cleaning

* more small testing fixes
* Added default value for PHANTOM_SUBNET_LOCATION environment variable
* Copy test phantom_subnets.toml file to $PHANTOM_SUBNET_LOCATION path
* Added mention of PHANTOM_SUBNET_LOCATION into README.md
* Added a bind mount for a local copy of the phantom_subnets.toml
* Included a copy of the test phantom_subnets.toml file into docker directory
* parsing error in V6Only subnet functor filter

* quick fix for types missed in #76
@jmwample
Copy link
Member Author

Removing test release as a requirement to get this merged as that seems like it will be a bigger effort and is relatively independent from this PR.

@jmwample jmwample mentioned this pull request May 11, 2021
jmwample and others added 16 commits May 17, 2021 11:10
…with rust 1.52.1 - temporary fix until protoc has a more stable update (#89)
* Modified .dockerignore to improve effectiveness of docker caching
* Changed Dockerfile to use ntop pfring package
* Added a script to add ntop repository and install pfring and ZC on the host system (Debian and Ubuntu)
* Update docker default phantom_subnets.toml file
* Added some sanity checks into zbalance container
	* Check if hugepages number is 512
	* Check if ZC driver is loaded
	* If check not passed show some hints what can be wrong
…ars to conjure.conf, and updated det service to correct bin name
@jmwample jmwample changed the title [WIP] Remove PF_Ring Submodule Remove PF_Ring Submodule Jul 12, 2021
@jmwample jmwample merged commit 0aaca54 into master Jul 12, 2021
@jmwample jmwample deleted the pfring-so branch July 12, 2021 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants