summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ipcpd: Fix access to uninitialized valueDimitri Staessens2018-02-261-14/+14
| | | | | | | | | This fixes the access to an uninitialized dt_pci struct when updating flow statistics in the case there is no next hop, which often resulted in a segmentation fault. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix data race when accessing DHT stateDimitri Staessens2018-02-261-1/+2
| | | | | | | | The dht_get_state() function should be used to get the state of the DHT. This fixes bug #4. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Enable debug symbols for debug buildsDimitri Staessens2018-02-261-0/+2
| | | | | | | | This sets the "-g" compiler flag if the build is not "Release" so that the sanitizers correctly display line numbers in their output. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* irmd: Cleanup flow datastructures on exit0.10.3Dimitri Staessens2018-02-242-6/+13
| | | | | | | | | The irmd was not cleaning up non-deallocated flows upon exit. This bug was probably introduced with the introduction of the threadpool managers. Also fixes a missing rwlock_destroy(). Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix malformed sprintf in dt component0.10.2Dimitri Staessens2018-02-242-2/+2
| | | | | | | | The sprintf was missing a format string. Some compilers did not complain about this. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix missing free in graph implementationSander Vrijders2018-02-241-0/+2
| | | | | | | | There was a missing free in case the address was not found in the routing table when trying to add an LFA for a certain address. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* irmd: Remove dead variable assignmentsSander Vrijders2018-02-241-2/+0
| | | | | | | | This removes two useless variable assignments from the IRMd, which were remnants from when the pending flow was being deallocated. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Fix cleanup of sdu schedulerDimitri Staessens2018-02-241-7/+7
| | | | | | | | | | Not all threads were cancelled on exit. This fixes (the rather cryptic) error message "The futex facility returned an unexpected error code" when running the stack with the address sanitizer. Also fixes possible double frees when a pthread_create would fail. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Print establishment time in flow statsDimitri Staessens2018-02-231-22/+35
| | | | | | | | | | The time of establishment will be printed as part of the flow statistics (it is the same as the modification time of the file in the FUSE filesystem). Some output was reordered and the length of the sizes is updated to be sufficient for 64-bit values. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* irmd: Replace fork and execv with posix_spawnSander Vrijders2018-02-232-28/+16
| | | | | | | | | This replaces the fork and execv calls with posix_spawn since it is supported on more platforms, and is more efficient. Also fixes some bad indentation. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* build: Deprecate version generation from git tag0.10.1Dimitri Staessens2018-02-232-50/+4
| | | | | | | | | | This deprecates the version generation from git tags. The version is now set in the CMakeLists.txt. This avoids wrong versions when checking out old commits and building the repository inside another repository. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Print endpoint in flow statisticsDimitri Staessens2018-02-234-14/+30
| | | | | | | | | | The flow statistics will now print the endpoint of the flow. If it's a local endpoint for the IPCP, it will print the component (e.g. "flow-allocator"). For remote flows, it will print the address of the IPCP. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Reset flow statistics on reuseDimitri Staessens2018-02-231-0/+2
| | | | | | | | The flow statistics were not reset when a new connection was created, resulting in wrong statistics. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix locking issues in flow statisticsDimitri Staessens2018-02-231-12/+59
| | | | | | | | | The locks were not initialised correctly due to a misspelled define and the fail_write was trying to lock a bad mutex (sometimes -1 out of array). This also fixes the statistics gathered. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix double definition of ipcp configDimitri Staessens2018-02-234-43/+16
| | | | | | | | | | The import of the IPCP config protobuf message in the enrollment message caused a double definition. The enroll.proto file is deprecated and the definition of the enrollment message is moved to the library to avoid this. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Fix missing lock in link-state policyDimitri Staessens2018-02-231-0/+27
| | | | | | | | The replication of the database was missing a lock. Now the database is first copied under lock and then sent. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Ignore void return value for gcry_randomizeDimitri Staessens2018-02-231-1/+2
| | | | | | | | The libgcrypt gcry_randomize function returns void which was returned as an int, which gives warnings on some compilers. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Export flow statistics to RIBDimitri Staessens2018-02-203-20/+399
| | | | | | | | | | This adds flow statistics for the data transfer (DT) component to the RIB. The DT component will keep track of the traffic on each flow. This feature can be enabled or disabled by setting the IPCP_FLOW_STATS variable in the build system. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* lib: Get RIB attributes from componentDimitri Staessens2018-02-203-52/+132
| | | | | | | | | | | | This revises the RIB so it gets the complete file attribute list from the component instead of setting some attributes in the library. This will allow setting read/write access later on in the component itself. The time of last change of lsdb entries in the file system is now set to the time of the last received Link State Update for that entry. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Allow out-of-tree build of toolsDimitri Staessens2018-02-1417-57/+150
| | | | | | | | | | This removes the dependencies for the tools on some ouroboros internal headers (endian.h and time_utils.h) so they can be built out-of-tree. The echo-app tool has been renamed oecho and the cbr tool has been renamed ocbr. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Revise Data Transfer component0.10.0Dimitri Staessens2018-02-1342-499/+492
| | | | | | | | | | | This makes the TTL non-optional and allows the maximum (initial) value of the TTL to be specified at bootstrap (the default is set to 60). The fd in the DT PCI is now called EID (Endpoint ID). The names "dif" and "ae" have been replaced by "layer" and "component" respectively in all sources. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Add sort command to GitVersionGen0.9.10Sander Vrijders2018-02-131-0/+7
| | | | | | | | This adds the sort command with the version sort to GitVersionGen so the latest version is used when running cmake. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* ipcpd: Revise lookup tracking in DHTDimitri Staessens2018-02-102-54/+88
| | | | | | | | | | The lookups now track the responses by cookie instead of just counting the remaining number of responses. This is needed because simultaneous lookups for the same hash interfere with eachother and lead to missed responses. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Use GNUInstallDirs instead of hardcoded values0.9.9Sander Vrijders2018-02-0615-23/+23
| | | | | | | | This changes the build to use GNUInstallDirs instead of hardcoded values. Package maintainers can then override these defaults by passing the correct value to cmake on the command line. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Add option to disable SWIG supportDimitri Staessens2018-02-061-49/+54
| | | | | | | | This allows disabling swig support on systems where swig is installed but it fails building (e.g. some versions of Raspbian). Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Replicate database on new MGMT flowDimitri Staessens2018-02-061-0/+17
| | | | | | | | This will trigger the existing member to send all entries in its database as LSAs to the new member. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Handle LU_DONE state in DHTDimitri Staessens2018-02-061-0/+1
| | | | | | | | The DHT would enter an infinite loop in lookup_wait() because the LU_DONE state was not handled correctly. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* Merge branch 'testing' into beSander Vrijders2018-02-051-2/+2
|\
| * irmd: Fix lookup of program for autoexecution0.9.8Dimitri Staessens2018-02-051-2/+2
| | | | | | | | | | | | | | | | Autoexecution failed because the lookup for the program was for the wrong field of the progtable. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-02-031-1/+1
|\|
| * tools: Fix check for return value in irm tool0.9.7Sander Vrijders2018-02-031-1/+1
| | | | | | | | | | | | | | | | A check was done in the irm tool for the pid of a newly created IPCP, but it didn't catch all failures, this fixes that. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-01-291-2/+2
|\|
| * lib: Fix assertions in timerwheel0.9.6Sander Vrijders2018-01-291-2/+2
| | | | | | | | | | | | | | | | The previous commit only fixed the issue for release builds. This fixes it for debug builds as well. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beDimitri Staessens2018-01-291-3/+3
|\|
| * lib: Fix bad comparison in timerwheel0.9.5Sander Vrijders2018-01-291-3/+3
| | | | | | | | | | | | | | | | A comparison was done in the timerwheel between an unsigned value and a time_t. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-01-251-4/+10
|\|
| * ipcpd: Wait for DHT_RUNNING state at register/query0.9.4Dimitri Staessens2018-01-251-4/+10
| | | | | | | | | | | | | | | | | | This will make the register and query calls at the DHT wait for a JOIN to complete. This avoids fails when calling register immediately after creating a data transfer connection. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-01-231-5/+2
|\|
| * ipcpd: Fix lookup handling in DHT0.9.3Dimitri Staessens2018-01-231-5/+2
| | | | | | | | | | | | | | | | Some responses for a query were missed because the lookup went into LU_COMPLETE state while still having pending requests. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | Merge branch 'testing' into beSander Vrijders2018-01-221-1/+1
|\|
| * lib: Fix bad lock in dev.c0.9.2Dimitri Staessens2018-01-221-1/+1
| | | | | | | | | | | | | | | | There was a rdlock() instead of an unlock(). This fixes #3. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* | include: Improve definitions of fccntl flagsDimitri Staessens2018-01-181-2/+2
|/ | | | | | | | Defining FLOWFNONBLOCK in terms of FLOWFRNOBLOCK and FLOWFWNOBLOCK and FLOWFDEFAULT in terms of FLOWFRDWR clarifies their meaning. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Set CC-BY 4.0 license on the man pages0.9.1Dimitri Staessens2018-01-119-9/+41
| | | | | | | | This adds the Creative Commons Attribution License 4.0 to the man pages instead of the Copyright. Also fixes the data in version.h. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* include: Add version header0.9.0Dimitri Staessens2018-01-105-5/+39
| | | | | | | | This moves the version definition for Ouroboros into its own header file, which is generated by CMake and installed on the system. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* build: Add patchlevel to versionDimitri Staessens2018-01-104-5/+13
| | | | | | | This adds a patchlevel to the Ouroboros version. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Update workflow and remove HLASander Vrijders2018-01-102-455/+127
| | | | | | | | | | The high level architecture and workflow document were severely outdated. This removes the HLA document, as a paper will soon be written and updates the workflow document to reflect the current situation. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
* include, src: Update copyright to 2018Dimitri Staessens2018-01-09179-179/+179
| | | | | | | Happy New Year, Ouroboros. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Fix typo in ouroboros man pageDimitri Staessens2017-12-201-1/+1
| | | | | | | There was a wrongly inserted "s" in the name of the udp IPCP. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* ipcpd: Use the term "layer" and deprecate "shim"Dimitri Staessens2017-12-1925-175/+169
| | | | | | | | | | | | | | This changes the terminology to use layer instead of DIF and deprecate the word "shim" for the IPCPs that attach to Ethernet LLC and UDP .The terminology has not yet been changed in the variable names etc. This reflects the design choices in Ouroboros to make IPCPs pure resource allocators instead of also providing an "IPC service". The Ouroboros IPCPs that attach to Ethernet and UDP implement the allocator and are thus not really shims. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
* doc: Fix formatting in ouroboros man pageDimitri Staessens2017-12-171-2/+2
| | | | | | | The ouroboros.8 man page contained some bad formatting symbols. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>