{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":152703097,"defaultBranch":"master","name":"ip2unix","ownerLogin":"nixcloud","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2018-10-12T06:19:22.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/7990577?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1692383296.0","currentOid":""},"activityList":{"items":[{"before":"bfca40ea470a63e5279fcdf302ae7a206cdf4b8f","after":"12428a08fefdfdcd07b92eb855a501df4344b97e","ref":"refs/heads/master","pushedAt":"2024-07-07T15:11:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"meson: Throw error if built with LTO enabled\n\nRight now, link-time optimisation doesn't work and produces symbols with\nnull references with our linker script.\n\nFor example without LTO:\n\n $ nm -D result/lib/libip2unix.so | grep socket\n 000000000000fed0 T socket\n\nWith LTO enabled however, we get the following:\n\n $ nm -D result/lib/libip2unix.so | grep socket\n 0000000000000000 A socket\n\nI haven't managed to find out why *exactly* this happens, but since we\ndon't have a fix yet, let's at least make sure users get an error\nmessage early on instead of a crash.\n\nSigned-off-by: aszlig \nIssue: https://github.com/nixcloud/ip2unix/issues/33","shortMessageHtmlLink":"meson: Throw error if built with LTO enabled"}},{"before":"643fdf403327abf1d962ab3e460b8948935b8b85","after":"bfca40ea470a63e5279fcdf302ae7a206cdf4b8f","ref":"refs/heads/master","pushedAt":"2024-07-07T11:44:38.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"flake.lock: Update to latest nixpkgs\n\nThis is to make sure we test against the latest set of GCC and LLVM\ncompilers, since we haven't updated them for a while.\n\nFlake lock file updates:\n\n• Updated input 'nixpkgs':\n 'github:NixOS/nixpkgs/e0e6b6909977de63dab514efbf5470bc31e7055e?narHash=sha256-YiFBn3K4l1AzVt8NeSg9ZJNvHxX2k%2BAkS74s/s4ASRA%3D' (2023-08-01)\n → 'github:NixOS/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb?narHash=sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8%3D' (2024-07-05)\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"flake.lock: Update to latest nixpkgs"}},{"before":"1083369be4c2a09256f06507bacdf2accadd8d78","after":"643fdf403327abf1d962ab3e460b8948935b8b85","ref":"refs/heads/master","pushedAt":"2024-06-29T20:19:57.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"README: Fix typo in \"incoming\"\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"README: Fix typo in \"incoming\""}},{"before":"cb3867aec0e3f940927a958de539cc33f2ef9740","after":"1083369be4c2a09256f06507bacdf2accadd8d78","ref":"refs/heads/master","pushedAt":"2023-08-18T18:28:12.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Bump version to 2.2.1\n\nI'm releasing this earlier rather than later because the missing\nserialisation for from-* will really confuse the heck out of anyone\nusing the feature because it will result in the rule matching *all*\nsockets (regardless of whether they're AF_UNIX or even AF_INET).\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Bump version to 2.2.1"}},{"before":"7e14c5247f56f75e2eace594601fa2efc5e58d0f","after":null,"ref":"refs/heads/readme-improvements","pushedAt":"2023-08-18T17:57:44.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"87c06e91d086e653515fe4b1892627ee37325e8f","after":"cb3867aec0e3f940927a958de539cc33f2ef9740","ref":"refs/heads/master","pushedAt":"2023-08-18T17:57:36.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"README: Improve wording and grammar\n\nI asked someone not entrenched in the implementation details (and who\nwants to stay anonymous) to have a look at the README and they pointed\nout a bunch of things that even I when reading a second time would have\na hard time understanding.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"README: Improve wording and grammar"}},{"before":"2ecc1bc8dd870a60a543ddd953c6d70bf5262311","after":"7e14c5247f56f75e2eace594601fa2efc5e58d0f","ref":"refs/heads/readme-improvements","pushedAt":"2023-08-18T17:50:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"fixup! README: Improve wording and grammar","shortMessageHtmlLink":"fixup! README: Improve wording and grammar"}},{"before":"a9b405b631054cf5cf1bf445b1a630a0b5a85c8a","after":"87c06e91d086e653515fe4b1892627ee37325e8f","ref":"refs/heads/master","pushedAt":"2023-08-18T17:46:09.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Fix missing serialisation for from-{unix,abstract}\n\nWhen adding support for transforming paths/names from existing Unix\ndomain sockets in e332bf5f61759d847f6f58d5cfe6d87b1b31973b, I forgot to\nactually add the new fields to the serialisation methods.\n\nThe effect of this is that when using from-*, we suddenly match *all*\nthe sockets, regardless of whether it's an existing Unix domain socket\nor not.\n\nOur test case didn't catch that because it ran in isolation with only\none rule, so I modified the test case to add an unrelated socket that\nshould not be picked up by ip2unix.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Fix missing serialisation for from-{unix,abstract}"}},{"before":null,"after":"2ecc1bc8dd870a60a543ddd953c6d70bf5262311","ref":"refs/heads/readme-improvements","pushedAt":"2023-08-16T16:24:12.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"README: Improve wording and grammar\n\nTODO\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"README: Improve wording and grammar"}},{"before":"d3b1b42345bb4dba633495389e26389a00f87b49","after":"a9b405b631054cf5cf1bf445b1a630a0b5a85c8a","ref":"refs/heads/master","pushedAt":"2023-08-16T15:02:15.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Bump version to 2.2.0\n\nThis release already is quite packed with features and most of the\nthings I wanted to get in (eg. abstract sockets and the from-* options)\nare done.\n\nGiven that I'm moderately happy with the current state and also the fact\nthat we now emit a deprecation warning for YAML, it's just more\nimportant that this warning is actually displayed to potential users.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Bump version to 2.2.0"}},{"before":"73e1d884414f717892e832e2965299a8f2f2f2c7","after":"d3b1b42345bb4dba633495389e26389a00f87b49","ref":"refs/heads/master","pushedAt":"2023-08-16T14:50:05.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"CHANGELOG: Fix redundand wording for \"Add...\"\n\nThe section already is called \"Addded\", so adding (pun not intended)\nanother \"Add\" in front of the items is redundant.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"CHANGELOG: Fix redundand wording for \"Add...\""}},{"before":"150da4dc998fd2cbdcac85adbe87f98efae5fbe2","after":"73e1d884414f717892e832e2965299a8f2f2f2c7","ref":"refs/heads/master","pushedAt":"2023-08-16T01:30:34.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Use Meson option for abstract socket support\n\nSo far, we checked whether the kernel is Linux, which generally is a\ngood indicator since abstract sockets are only supported on Linux.\n\nThe disadvantage of checking for defined(__linux__) is that we can't\nsimply disable it, except if we'd switch kernels. Disabling support\nhowever is necessary so that we can check whether compilation still\nsucceeeds with that feature disabled.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Use Meson option for abstract socket support"}},{"before":"150da4dc998fd2cbdcac85adbe87f98efae5fbe2","after":null,"ref":"refs/heads/fix-preliminary-unlink","pushedAt":"2023-08-16T00:43:32.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"ac6a3d90c20fb30fe5cdaac3b0e91087e031894b","after":"150da4dc998fd2cbdcac85adbe87f98efae5fbe2","ref":"refs/heads/master","pushedAt":"2023-08-16T00:43:14.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Add flag to prevent unlinking of socket file\n\nThis is something I tried to properly fix for ages, but I haven't found\na very good solution. The commit is not what I'd call a good solution or\neven a real solution at all, but it should work around problematic\ncases.\n\nSo here is (simplified) how ip2unix currently tracks socket file\ndescriptors:\n\n * We have an internal registry, which maps the file descriptors of the\n current process to our internal Socket state.\n * Whenever we get a new socket() call, we insert the file descriptor\n into the registry. Note that at this point, we can't make a final\n decision about how to handle this socket, because we only know the\n socket family (eg. AF_INET or AF_INET6) but no details about ports\n or IP addresses.\n * Once we get a bind() or connect() call, we look up the file\n descriptor in the registry and see whether we have a matching rule.\n * If the rule matches, we go ahead and execute the corresponding\n action (eg. convert to Unix socket, blackhole, reject, etc...), if\n it doesn't we just remove the file descriptor from the registry and\n call the real bind() or connect() function.\n * Once the socket is closed, we remove the file descriptor from the\n registry and (where applicable) unlink the socket file.\n\nThis all works fine if everything is run in order and without any\nmultiprocessing involved, but as soon as the application invokes\nclone(), things start to get ugly.\n\nEssentially we have two clone() flags that are problematic:\n\n CLONE_VM:\n\n If set, the calling process and the child process run in the same\n memory space. In particular, memory writes performed by the calling\n process or by the child process are also visible in the other\n process.\n\n If not set, the child process runs in a separate copy of the memory\n space of the calling process at the time of the clone call. Memory\n writes or file mappings/unmappings performed by one of the processes\n do not affect the other.\n\n CLONE_FILES:\n\n If set, the calling process and the child process share the same\n file descriptor table. Any file descriptor created by the calling\n process or by the child process is also valid in the other process.\n\n If not set, the child process inherits a copy of all file\n descriptors opened in the calling process at the time of the clone\n call. Subsequent operations that open or close file descriptors, or\n change file descriptor flags, performed by either the calling\n process or the child process do not affect the other process.\n\nHere is how these flags are affecting us:\n\n Both CLONE_VM and CLONE_FILES set:\n\n Processes share memory and also share file descriptors, which\n essentially means that we don't need to do anything, because the\n registry and the file descriptor table is all that we need for\n properly tracking the state.\n\n Only CLONE_VM set:\n\n This is a little more tricky since we have one shared registry across\n both processes, but the file descriptor tables are copied. This means\n that whenever we're closing a socket in the second process, we can\n not yet unlink the socket file until the file descriptor is also\n closed in the first process. We could basically just implement a\n garbage collector when the used socket file descriptors reach zero.\n\n Only CLONE_FILES set:\n\n Here we have two registries, but one shared file descriptor table. In\n this scenario, we could use a dedicated file descriptor that we can\n use for sharing state between two registries.\n\n None of those flags set:\n\n Again, two registries, but also a copy of the file descriptor table.\n\n This is our nightmare scenario, consider this chain of events:\n\n * Process 1 creates a socket\n * Process 1 clone()s into process 2\n * Process 2 closes the socket and ip2unix unlinks the file\n * ... wait, what!?\n\n Process 1 still has to be able to operate on the socked but we\n essentially made the socket a blackhole since it's no longer\n reachable via the filesystem. There is also no way to handle this\n properly without also introducing some side channel that tracks the\n state from outside.\n\nThe non-solution I went with is basically adding a new flag called\n\"noremove\", which prevents the socket path from being unlinked when the\nsocket is closed.\n\nThis doesn't fully solve the issue because ip2unix still removes the\nsocket file descriptor from the registry and also has no way to even\nknow if it is a socket it should track.\n\nHowever, this allows us to deal with the issue until we have found a\nreal solution and the test case I added is essentially replicating most\nprograms I found in the wild.\n\nSigned-off-by: aszlig \nCloses: https://github.com/nixcloud/ip2unix/issues/16","shortMessageHtmlLink":"Add flag to prevent unlinking of socket file"}},{"before":"a182d59b188229c23d0d2aa9b490e7cf4d54a478","after":"150da4dc998fd2cbdcac85adbe87f98efae5fbe2","ref":"refs/heads/fix-preliminary-unlink","pushedAt":"2023-08-16T00:42:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Add flag to prevent unlinking of socket file\n\nThis is something I tried to properly fix for ages, but I haven't found\na very good solution. The commit is not what I'd call a good solution or\neven a real solution at all, but it should work around problematic\ncases.\n\nSo here is (simplified) how ip2unix currently tracks socket file\ndescriptors:\n\n * We have an internal registry, which maps the file descriptors of the\n current process to our internal Socket state.\n * Whenever we get a new socket() call, we insert the file descriptor\n into the registry. Note that at this point, we can't make a final\n decision about how to handle this socket, because we only know the\n socket family (eg. AF_INET or AF_INET6) but no details about ports\n or IP addresses.\n * Once we get a bind() or connect() call, we look up the file\n descriptor in the registry and see whether we have a matching rule.\n * If the rule matches, we go ahead and execute the corresponding\n action (eg. convert to Unix socket, blackhole, reject, etc...), if\n it doesn't we just remove the file descriptor from the registry and\n call the real bind() or connect() function.\n * Once the socket is closed, we remove the file descriptor from the\n registry and (where applicable) unlink the socket file.\n\nThis all works fine if everything is run in order and without any\nmultiprocessing involved, but as soon as the application invokes\nclone(), things start to get ugly.\n\nEssentially we have two clone() flags that are problematic:\n\n CLONE_VM:\n\n If set, the calling process and the child process run in the same\n memory space. In particular, memory writes performed by the calling\n process or by the child process are also visible in the other\n process.\n\n If not set, the child process runs in a separate copy of the memory\n space of the calling process at the time of the clone call. Memory\n writes or file mappings/unmappings performed by one of the processes\n do not affect the other.\n\n CLONE_FILES:\n\n If set, the calling process and the child process share the same\n file descriptor table. Any file descriptor created by the calling\n process or by the child process is also valid in the other process.\n\n If not set, the child process inherits a copy of all file\n descriptors opened in the calling process at the time of the clone\n call. Subsequent operations that open or close file descriptors, or\n change file descriptor flags, performed by either the calling\n process or the child process do not affect the other process.\n\nHere is how these flags are affecting us:\n\n Both CLONE_VM and CLONE_FILES set:\n\n Processes share memory and also share file descriptors, which\n essentially means that we don't need to do anything, because the\n registry and the file descriptor table is all that we need for\n properly tracking the state.\n\n Only CLONE_VM set:\n\n This is a little more tricky since we have one shared registry across\n both processes, but the file descriptor tables are copied. This means\n that whenever we're closing a socket in the second process, we can\n not yet unlink the socket file until the file descriptor is also\n closed in the first process. We could basically just implement a\n garbage collector when the used socket file descriptors reach zero.\n\n Only CLONE_FILES set:\n\n Here we have two registries, but one shared file descriptor table. In\n this scenario, we could use a dedicated file descriptor that we can\n use for sharing state between two registries.\n\n None of those flags set:\n\n Again, two registries, but also a copy of the file descriptor table.\n\n This is our nightmare scenario, consider this chain of events:\n\n * Process 1 creates a socket\n * Process 1 clone()s into process 2\n * Process 2 closes the socket and ip2unix unlinks the file\n * ... wait, what!?\n\n Process 1 still has to be able to operate on the socked but we\n essentially made the socket a blackhole since it's no longer\n reachable via the filesystem. There is also no way to handle this\n properly without also introducing some side channel that tracks the\n state from outside.\n\nThe non-solution I went with is basically adding a new flag called\n\"noremove\", which prevents the socket path from being unlinked when the\nsocket is closed.\n\nThis doesn't fully solve the issue because ip2unix still removes the\nsocket file descriptor from the registry and also has no way to even\nknow if it is a socket it should track.\n\nHowever, this allows us to deal with the issue until we have found a\nreal solution and the test case I added is essentially replicating most\nprograms I found in the wild.\n\nSigned-off-by: aszlig \nCloses: https://github.com/nixcloud/ip2unix/issues/16","shortMessageHtmlLink":"Add flag to prevent unlinking of socket file"}},{"before":"e75161b312641af326a897bdfbd627ffc18a594d","after":"ac6a3d90c20fb30fe5cdaac3b0e91087e031894b","ref":"refs/heads/master","pushedAt":"2023-08-15T13:07:59.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"socketpath: Add missing std::hash implementation\n\nWhen adding support for abstract sockets in commit\na1b0a51ec4a337c27001e11cdc9a3ac4b7cebc8c, I accidentally forgot to add\nthe actual hash implementation for the new SocketPath struct, which I\nmarked as TODO but then forgot.\n\nThe practical implications of this are really neglicible since most of\nthe time users won't mix abstract and filesystem sockets with the same\nname in gazillion of rules so that hash collisions would make a\nperformance impact.\n\nHowever, the *real* impact is that the \"// TODO\" comment is a major\nannoyance to me, so with this commit it's gone :-)\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"socketpath: Add missing std::hash implementation"}},{"before":"d7b3bdeedec0d6679446e5de78a8372a1db7fc8f","after":"e75161b312641af326a897bdfbd627ffc18a594d","ref":"refs/heads/master","pushedAt":"2023-08-15T11:45:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Revert \"Use dlopen on libc instead of RTLD_NEXT\"\n\nThis reverts commit f47125c0513ecc484c8f537e9f496d601c3ec7b4.\n\nThe commit in question directly used the C library instead of RTLD_NEXT\nwhenever possible, based on some deadlock I didn't specify further in\nthe commit message.\n\nI could not reproduce a deadlock like this and given that we don't have\na test case that fails with RTLD_NEXT tells me that it doesn't matter.\n\nIn addition to just reverting, I also added a small test case that I\nused in order to try reproducing the aforementioned issue. Even though I\ncouldn't reproduce the issue, I'm adding the test anyway since we didn't\nhave a test case where we use multiple LD_PRELOAD wrappers that operate\non the same set of calls as ip2unix.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Revert \"Use dlopen on libc instead of RTLD_NEXT\""}},{"before":"0ae8d4ce4214660e9632a5c03a8a40860d5afb71","after":"d7b3bdeedec0d6679446e5de78a8372a1db7fc8f","ref":"refs/heads/master","pushedAt":"2023-08-15T00:09:11.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Remove config for LGTM service\n\nThe lgtm.com service no longer exists and it's now integrated into\nGitHub code scanning[1]. This also means that the config file for it is\nobsolete and we can simply remove it.\n\n[1]: https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Remove config for LGTM service"}},{"before":"f4354ae8f582570676feb74a2df6c291f09acea2","after":"0ae8d4ce4214660e9632a5c03a8a40860d5afb71","ref":"refs/heads/master","pushedAt":"2023-08-15T00:04:39.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Improve changelog entry for stream/datagram aliases\n\nThis was introduced in e11498e2dbfc5b238f6e98e25c16ba5706ba6d26, where I\nadded a changelog entry about some internal type changes.\n\nHowever, the change in question not only changed the internal types but\nalso added user-facing aliases, so the changelog entry should actually\nreflect that instead of talking about some internal chages that are\ntotally irrelevant to users of ip2unix.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Improve changelog entry for stream/datagram aliases"}},{"before":"e11498e2dbfc5b238f6e98e25c16ba5706ba6d26","after":"f4354ae8f582570676feb74a2df6c291f09acea2","ref":"refs/heads/master","pushedAt":"2023-08-14T22:34:16.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"rules: Split Rule struct into matches and action\n\nIn 242c78d68b46282983e7658e67083f9b96fc086f, we improved the README file\nby more clearly distinguishing between matches and an action of a rule.\n\nHowever, the code did not yet reflect this and all rule arguments were\nthrown together into one single struct without this important\ndistinction.\n\nIt makes sense to actually model our data structures in the same terms\nwe use in our documentation, so this is only a start of that.\n\nThe reason why I'm using the plural \"matches\" is because we can have\nseveral of them, while onle one action is possible.\n\nRight now, the Rule.action field is still a struct, but ideally this\nshould be an std::variant so that we can enforce this constraint at the\ntype level.\n\nSince std::variant and particularly std::visit is very gruesome compared\nto eg. the \"match\" keyword in Rust, \"case\" in Haskell or any other\nlanguage with proper algebraic data types, moving to std::variant will\nbe more involved. For now however, splitting Rule into these two\nsub-structs is at least a move in the right direction.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"rules: Split Rule struct into matches and action"}},{"before":"799e5b935bf0ad2de645dbb531d0983e5f7a3933","after":"e11498e2dbfc5b238f6e98e25c16ba5706ba6d26","ref":"refs/heads/master","pushedAt":"2023-08-09T17:23:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Internally use proper sotypes instead of TCP/UDP\n\nSo far we've exclusively focussed on TCP and UDP as the socket type, but\ntechnically the correct term would be stream and datagram socket types.\n\nAt some point we're going to have the ability to work on *existing* Unix\ndomain sockets and using TCP and UDP as names for the socket type is\nreally confusing, since it's not actually a real UDP/TCP socket.\n\nWe still allow to use \"udp\" and \"tcp\" for rule definitions and also use\n\"UDP\" and \"TCP\" when displaying the parsed rules, but we no longer use\nit internally.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Internally use proper sotypes instead of TCP/UDP"}},{"before":"bdeadcef1419f939ee01396cb9d073dfe1923862","after":"799e5b935bf0ad2de645dbb531d0983e5f7a3933","ref":"refs/heads/master","pushedAt":"2023-08-08T14:46:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"tests/connector: Switch to UUID for abstract name\n\nThis is similar to 2833273873d6a5e134618acd9cb37e913e7bd90d, where we\nused UUIDs for the dedicated abstract test. However, when running the\nrepeat100 tests, we also ran into collisions with the connector, so\nlet's actually switch the connector to use UUIDs as well to avoid this.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"tests/connector: Switch to UUID for abstract name"}},{"before":"2833273873d6a5e134618acd9cb37e913e7bd90d","after":"bdeadcef1419f939ee01396cb9d073dfe1923862","ref":"refs/heads/master","pushedAt":"2023-08-08T14:33:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"tests: Synchronise when running abstract connector\n\nBy default, the run_server method doesn't wait until the socket is ready\nand hands over to the context manager as soon as the connector process\nis started.\n\nThis obviously is prone to race conditions where we get errors whenever\nthe client is trying to connect too early.\n\nWe do have a sync keyword argument for this already, so all we need to\ndo to make the test more stable is to enable it.\n\nI also added a docstring which explains the keyword arguments a bit so\nthat next time I hopefully won't forget about it.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"tests: Synchronise when running abstract connector"}},{"before":"a1b0a51ec4a337c27001e11cdc9a3ac4b7cebc8c","after":"2833273873d6a5e134618acd9cb37e913e7bd90d","ref":"refs/heads/master","pushedAt":"2023-08-08T02:17:35.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"tests/abstract: Use UUID for the abstract name\n\nThe repeat100 Hydra jobsets fail regularly with errors like these:\n\n @abstract_sockets_only\n def test_abstcact_socket():\n with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:\n > sock.bind('\\0abstest')\n E OSError: [Errno 98] Address already in use\n\nThis of course is because we always use the same abstract socket name,\nwhich at some point might not be cleaned up before the next test run\nstarts, resulting in the above error.\n\nSimply using an UUID as the name should avoid this.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"tests/abstract: Use UUID for the abstract name"}},{"before":"a1b0a51ec4a337c27001e11cdc9a3ac4b7cebc8c","after":null,"ref":"refs/heads/abstract-sockets","pushedAt":"2023-08-08T02:01:29.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"}},{"before":"2f9a4a4f587aed522918a802337e0f6089f95173","after":"a1b0a51ec4a337c27001e11cdc9a3ac4b7cebc8c","ref":"refs/heads/master","pushedAt":"2023-08-08T02:01:06.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Add support for abstract sockets\n\nAdding abstract namespace sockets has been requested a long time ago[1]\nand while I also had a partial implementation laying around, it was also\nso ugly that I didn't want to merge it.\n\nThe reason why it was ugly was that first of all, I added another\n\"abstract\" field to struct Rule and second, I used a boolean is_abstract\nall over the place to distinguish between socket_path and abstract.\n\nWhile in the end this resulted in a functional implementation, it also\nmade the code messier and hard to extend.\n\nIn the years passing since the aforementioned issue, I had several\noccasions where abstract sockets would have been useful, so today I\ndecided to rewrite the ugly implementation mentioned above.\n\nThe new implementation now simply abstracts away the socket_path field\ninto a SocketPath type, which then either is marked Type::ABSTRACT or\nType::FILESYSTEM.\n\nThis has the advantage that we only need to know the details about\nSocketPath when we parse the rules and when we create the SockAddr,\neverything in between is just changing types from std::string to\nSocketPath.\n\n[1]: https://github.com/nixcloud/ip2unix/issues/8\n\nSigned-off-by: aszlig \nCloses: https://github.com/nixcloud/ip2unix/issues/8","shortMessageHtmlLink":"Add support for abstract sockets"}},{"before":"14d62fe1f2b2f4b71dce6183b5903c44a08eda44","after":"a1b0a51ec4a337c27001e11cdc9a3ac4b7cebc8c","ref":"refs/heads/abstract-sockets","pushedAt":"2023-08-08T02:00:47.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Add support for abstract sockets\n\nAdding abstract namespace sockets has been requested a long time ago[1]\nand while I also had a partial implementation laying around, it was also\nso ugly that I didn't want to merge it.\n\nThe reason why it was ugly was that first of all, I added another\n\"abstract\" field to struct Rule and second, I used a boolean is_abstract\nall over the place to distinguish between socket_path and abstract.\n\nWhile in the end this resulted in a functional implementation, it also\nmade the code messier and hard to extend.\n\nIn the years passing since the aforementioned issue, I had several\noccasions where abstract sockets would have been useful, so today I\ndecided to rewrite the ugly implementation mentioned above.\n\nThe new implementation now simply abstracts away the socket_path field\ninto a SocketPath type, which then either is marked Type::ABSTRACT or\nType::FILESYSTEM.\n\nThis has the advantage that we only need to know the details about\nSocketPath when we parse the rules and when we create the SockAddr,\neverything in between is just changing types from std::string to\nSocketPath.\n\n[1]: https://github.com/nixcloud/ip2unix/issues/8\n\nSigned-off-by: aszlig \nCloses: https://github.com/nixcloud/ip2unix/issues/8","shortMessageHtmlLink":"Add support for abstract sockets"}},{"before":"964023b2e97df6ed85bcc379f5620ed95054b87f","after":"14d62fe1f2b2f4b71dce6183b5903c44a08eda44","ref":"refs/heads/abstract-sockets","pushedAt":"2023-08-08T01:58:50.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Add support for abstract sockets\n\nAdding abstract namespace sockets has been requested a long time ago[1]\nand while I also had a partial implementation laying around, it was also\nso ugly that I didn't want to merge it.\n\nThe reason why it was ugly was that first of all, I added another\n\"abstract\" field to struct Rule and second, I used a boolean is_abstract\nall over the place to distinguish between socket_path and abstract.\n\nWhile in the end this resulted in a functional implementation, it also\nmade the code messier and hard to extend.\n\nIn the years passing since the aforementioned issue, I had several\noccasions where abstract sockets would have been useful, so today I\ndecided to rewrite the ugly implementation mentioned above.\n\nThe new implementation now simply abstracts away the socket_path field\ninto a SocketPath type, which then either is marked Type::ABSTRACT or\nType::FILESYSTEM.\n\nThis has the advantage that we only need to know the details about\nSocketPath when we parse the rules and when we create the SockAddr,\neverything in between is just changing types from std::string to\nSocketPath.\n\n[1]: https://github.com/nixcloud/ip2unix/issues/8\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Add support for abstract sockets"}},{"before":"cae5c5c96e1f88f29dde997a1925db520828538b","after":"2f9a4a4f587aed522918a802337e0f6089f95173","ref":"refs/heads/master","pushedAt":"2023-08-07T22:16:38.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"Don't compile with Clang 9 and GNU libstdc++\n\nI haven't yet dug into the details on why this combination segfaults,\nbut here is the backtrace:\n\n 0x000000000051fa1b in std::filesystem::__cxx11::path::_List::_Impl_deleter::operator()(std::filesystem::__cxx11::path::_List::_Impl*) const ()\n 0x0000000000479307 in parse_rule_arg(unsigned long, std::__cxx11::basic_string, std::allocator > const&) ()\n 0x00000000004713cf in main ()\n\nSince Clang 9 is pretty old and it's also highly unlikely that we'll see\nthis combination in conjunction with ip2unix in the wild, I decided to\njust exclude this combination from our tests.\n\nTo make *absolutely* sure nobody actually uses this combination or any\nother toolchain where std::filesystem doesn't work, I added a small\ncheck in Meson that bails out if std::filesystem doesn't work correctly.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"Don't compile with Clang 9 and GNU libstdc++"}},{"before":"3e7dec04fa7c2715f96164873e5beaadf72a2b74","after":"964023b2e97df6ed85bcc379f5620ed95054b87f","ref":"refs/heads/abstract-sockets","pushedAt":"2023-08-06T16:28:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"aszlig","name":null,"path":"/aszlig","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/192147?s=80&v=4"},"commit":{"message":"[WIP] Add small test case for abstract sockets\n\nI haven't verified whether this test case would even work if the\nimplementation is correct, but so far it fails spectacularly.\n\nTODO: Amend this very commit and not only add more tests but actually do\nthe verification mentioned above.\n\nSigned-off-by: aszlig ","shortMessageHtmlLink":"[WIP] Add small test case for abstract sockets"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wNy0wN1QxNToxMTo1MC4wMDAwMDBazwAAAAR45ztq","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wNy0wN1QxNToxMTo1MC4wMDAwMDBazwAAAAR45ztq","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0wOC0wNlQxNjoyODo0OS4wMDAwMDBazwAAAANk9HHp"}},"title":"Activity · nixcloud/ip2unix"}