Closed Sur3 closed 4 years ago
Ah ok i gone this workaround by using a shellscript to change path for execution. ^^" But you're probably right and changing the path during compilation is more elegant. 👍
i tried to update the makefile to include the iface_up path but there is an error now finding the script, i'll fix that in a few hours.. ^^
Ok it's working, the problem was just i didn't have "comment" match support in the kernel because that's an extended netfilter option, probably it would be cleaner to just remove the two rules added instead of save/restore with comment filter. ^^ By standard the makefile compiles now with an iface_up.sh path for installing in /usr/local prefix, but the old compile behaviour for same path can be forced with "make iface_up_sh_path=.". I also included a config.mk which is created during compilation of network.c to store the path for later inclusion during install/uninstall. Installing with an other prefix is done with e.g. "make prefix=/usr && make prefix=/usr install" probably a configure-script or cmake (or inclusion of all paths in config.mk) would be a cleaner solution, then one needn't set the prefix twice.
I dont know if it's mac compatible though because of the bash commands and i dont have a mac here to test that.
ok, i'll check macOS compatibility. thanks.
Adding install and uninstall targets in Makefile. Ok now it working right.