| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
| |
To publish dpibreak to there
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
This change release tarball name to dpibreak-x.y.z.-target and
directory inside to dpibreak-x.y.z.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
| |
tarball: dpibreak-x.y.z-unknown-linux-musl.tar.gz
distname: dpibreak-x.y.z
|
| | |
|
| | |
|
| |
|
|
| |
This was very log lived bug. Finally fixed.
|
| |
|
|
|
|
| |
Since commit 7f5456b ("windows: pull windivert-0.6.0 to local crate/
dir from crates.io"), the workspace layout changed and the version
detection in Makefile no longer finds the right Cargo.toml.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Register a handler to clean up all WinDivert handles and stop the
WinDivert service when the program terminates. To achieve this, the
windivert crate was moved in-tree and patched: WinDivert::shutdown()
was relaxed to take &self, and a memory bug in the uninstall path was
fixed.
The root cause is that stopping the service while any handle is still
open leaves the SCM registration in a bad state, making subsequent
WinDivertOpen() calls fail with 1058 (see upstream report below).
Closes: https://github.com/dilluti0n/dpibreak/issues/21
Link: https://github.com/dilluti0n/dpibreak/issues/29
Link: https://github.com/dilluti0n/dpibreak/pull/30
Link: https://github.com/basil00/WinDivert/issues/406
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Query the service state with `sc query windivert` at startup, as this
is observed to resolve the bad state described in commit 168a88b8
("windows: fix some kind of race").
This is a defensive measure against the driver uninstall introduced by
that commit. Normally the uninstall is attempted only after all
handles opened by the current process are closed, but if another
process still holds an open WinDivert handle at that point, the driver
can remain stuck in a bad state on subsequent runs.
Link: https://github.com/basil00/WinDivert/issues/406
|
| | |
| |
| |
| |
| | |
It is unlikely that there is a `paexit` call in the service path, but
there is no harm in checking for it.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
loop on CTRL_CLOSE_EVENT handler causes pause occurs when the user
closes the console by clicking the 'X' button, which degrades user
experience.
This change terminates program immediately if no error occurs.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Uninstalling before all handles were closed resulted in a os error
1058 when try to open windivert. (sc stop windivert fixed it)
Assumed the uninstallation would fail if the handle was still
active, but it seems the initial uninstallation actually succeeded,
while the subsequent attempt to close the remaining handles failed.
Closing send handle that hadn't been closed previously and then
explicitly performed the uninstallation fixes the issue.
|
| | |
| |
| |
| |
| |
| |
| | |
This allows the WinDivert.sys can be removed after the program
terminates, without needing to run `sc stop windivert`.
Bug: https://github.com/dilluti0n/dpibreak/issues/21
|
| | | |
|
| | |
| |
| |
| |
| | |
This inturrupts blocking recv() calls resulting WinDivert service can
be safely removed.
|
| | |
| |
| |
| |
| |
| |
| | |
Unblocking WinDivertRecv() from another thread is in fact the whole
purpose of WinDivertShutdown(), but &mut self made that impossible on
a shared (Arc) handle. It only reads self.handle and doesn't
invalidate it, so &self is sound.
|
| | |
| |
| |
| |
| | |
This should be null terminated or OpenServiceA() have no chance to
know where str is stopped.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MaybeUninit::uninit() is not bound to any variable, so the temporary
is dropped at the end of the statement, leaving `status` as a dangling
pointer into the freed stack slot. Passing it to ControlService() as
an out-pointer then makes the kernel write through a dangling pointer,
which is undefined behavior.
Bind the MaybeUninit<SERVICE_STATUS> to a local so it outlives the
pointer.
|
| | |
| |
| |
| | |
Version for crates/windivert was detected first
|
| | | |
|
| |/
|
|
|
|
| |
This is pulled from cargo cache:
cp -r ~/.cargo/registry/src/index.crates.io-*/windivert-0.6.0 \
crates/windivert
|
| |
|
|
| |
See error message
|
| | |
|
| |
|
|
| |
Result should be unusable after Pkt is dropped, not rx is dropped.
|
| |
|
|
|
|
|
|
|
| |
While solving it, introduced Pkt abstraction so that advance() is
automatically executed upon dropping it.
This change still allows access to mmapped pointers within the
Pkt.net() and enables the addition of other slice fields (such as mac)
later.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
cleanup_rules() relies on the global flag IS_NFT_NOT_SUPPORTED, which
is always False before install_rule is called. Fixed it to always
attempt cleanup for ipt/ip6/nft at startup.
At the same time, implement Drop so that firewall cleanup occurs when
dies due to ?.
|
| |
|
|
| |
This makes windows users able to see the error message.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
It would be better if libc_s did not provide signalfd. The
open_signalfd() function itself has issues, such as sigprocmask being
applied elsewhere before opening it.
|
| |\
| |
| |
| |
| | |
Drop nix and add libc_s wrappers (with nix::fcntl like setsockopt
abstraction).
|
| | |
| |
| |
| |
| | |
This is likely new feature in kernel. (mayby 5.6 or something near
there)
|
| | | |
|