aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Makefile.inc: prepare for netifrc-0.7.12HEAD0.7.12masterSam James12 days1-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* net: iproute2: fix missing quotes in testAlexander Zubkov12 days1-1/+1
| | | | | | | | | | | | | | | | | Missing quotes cause incorrect evaluation of an empty string, causing the expression to be always true. Thus every route is considered "nodev" route, causing problems in cases where specific dev is required. Original "nodev" patch 7c6a8de0 contained bashism that forgave missing quoutes. But later it was fixed by 97a79cfd, and the missing quotes became critical. Signed-off-by: Alexander Zubkov <green@qrator.net> Closes: https://bugs.gentoo.org/940443 X-Gentoo-Bug: 940443 X-Gentoo-Bug-URL: https://bugs.gentoo.org/940443 Closes: https://github.com/gentoo/netifrc/pull/58 Signed-off-by: Sam James <sam@gentoo.org>
* Makefile.inc: prepare for netifrc-0.7.110.7.11Sam James2024-09-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* net: fix ip*6*token installSam James2024-09-231-1/+1
| | | | | Fixes: c7e2531539064d3035e5ae2710e408e8975e354e Signed-off-by: Sam James <sam@gentoo.org>
* Makefile.inc: prepare for netifrc-0.7.100.7.10Sam James2024-09-231-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Actually install iptoken.sh.Jaco Kroon2024-09-071-1/+1
| | | | | | | | This is a fixup of bde6dd2ad5b393e351ae8fd8d89f3bec62e52914 where I didn't notice that I need to additionally add to the Makefile to have the script installed. Signed-off-by: Jaco Kroon <jaco@uls.co.za>
* net/ip6token.sh: cleanup whitespaceSam James2024-09-011-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* net: iproute2: fix bashismSam James2024-09-011-1/+1
| | | | | | | Reported by CyberTailor at https://github.com/gentoo/netifrc/pull/53#discussion_r1740019302. Fixes: 7c6a8de0c521ea474bccb0dbda4338ff293cdfc6 Signed-off-by: Sam James <sam@gentoo.org>
* Disable IPv6 on subdevices for bonding and bridges0.7.9Patrick McLean2024-08-282-0/+4
| | | | | | | | | | | Rather than shelling out to the `sysctl` command like the PR does, let's write directly to `/proc/sys` after checking that it exists. This likely needs work to do the same thing on BSD. Closes: https://bugs.gentoo.org/515640 Closes: https://github.com/gentoo/netifrc/pull/55 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
* Implement ip-token(8) addressing for IPv6.Jaco Kroon2024-07-012-0/+35
| | | | | | | | | This enables setting ip-token(8) up during pre-up from a config variable ip6token_${IFVAR} to set up tokens to be used during SLAAC auto-configuration. Closes: https://bugs.gentoo.org/935280 Signed-off-by: Jaco Kroon <jaco@uls.co.za>
* Append wireguard docs at net.example with arbitrary interface name exampleAndrey Volkov2024-05-241-0/+4
| | | | Signed-off-by: Andrey Volkov <volkov@ekb-info.ru>
* Add type_${IFVAR}=wireguard for arbitrary wireguard interface namesAndrey Volkov2024-05-241-2/+9
| | | | Signed-off-by: Andrey Volkov <volkov@ekb-info.ru>
* Add missing wireguard_depend programAndrey Volkov2024-05-241-1/+1
| | | | Signed-off-by: Andrey Volkov <volkov@ekb-info.ru>
* net/wireguard.sh: make wireguard module to run before interfaceAlexander Zubkov2024-05-231-1/+1
| | | | | | | | | | | | | | | | Wireguard module was configured to run after interface module, that caused interface-related settings like mtu not to apply, because wireguard interfaces was not present by that time. It seems logical that wireguard module should be run before interface module. Credits to lmk <lmkrawiec@gmail.com> who proposed the solution and to Louis Sautier (sbraz) <sbraz@gentoo.org> who proposed the patch. Closes: https://bugs.gentoo.org/678184 Closes: https://github.com/gentoo/netifrc/pull/54 Signed-off-by: Louis Sautier (sbraz) <sbraz@gentoo.org> Signed-off-by: Alexander Zubkov <green@qrator.net> Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
* Allow setting blackhole-like routesAlexander Zubkov2024-05-232-6/+55
| | | | | | | | | | | | | | | | | | | | | There were several problems preventing usage of routes of types blackhole, prohibit, throw, unreachable in IFACE_routes variables: - Those route types do not allow to use dev in the route definition, but it was added unconditionally - As there is no dev, such routes are not flushed automatically by dev, they need to be remembered and deleted while stopping the interface - Route type must go before the prefix in the command, but first parameters have special meaning Signed-off-by: Alexander Zubkov <green@qrator.net> Closes: https://bugs.gentoo.org/637394 Closes: https://github.com/gentoo/netifrc/pull/53 X-Gentoo-Bug: 637394 X-Gentoo-Bug-URL: https://bugs.gentoo.org/637394 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
* mk/os.mk: don't use OS env var for overridingMatoro Mahri2024-01-141-1/+1
| | | | | | | | | | | If you want to override the OS or OS-detect command you can still use _OS and _OS_SH, but OS is too common of an environment variable to listen for. Closes: https://bugs.gentoo.org/906171 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/netifrc/pull/52 Signed-off-by: Sam James <sam@gentoo.org>
* Remove support for treecleaned net-misc/pump0.7.8Matoro Mahri2024-01-075-71/+5
| | | | | | | | Bug: https://bugs.gentoo.org/694314 Closes: https://bugs.gentoo.org/921538 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/netifrc/pull/51 Signed-off-by: Sam James <sam@gentoo.org>
* net.lo.in: replace "type" bashism with "command"Matoro Mahri2024-01-071-1/+1
| | | | | | | Closes: https://bugs.gentoo.org/844178 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Closes: https://github.com/gentoo/netifrc/pull/50 Signed-off-by: Sam James <sam@gentoo.org>
* net/dummy.sh: preload module, create interface conditionallyMatoro Mahri2023-11-251-5/+11
| | | | | | | | | | | | | | | | | | | The dummy module has a numdummies parameter which will cause it to automatically create N dummy interfaces at load time. Because creating a dummy interface causes the kernel to load the module if it is not already loaded, then if the name of the interface to be created matches the name of one of the interfaces the kernel creates, an error will be returned indicating that the interface already exists, despite it not existing before the command was invoked. Ensure we load the module before attempting to create any interface, then only create the interface if it does not already exist, otherwise simply configure it. See: https://serverfault.com/q/839430 Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://github.com/gentoo/netifrc/pull/43
* net: add qmi interface supportAlon Bar-Lev2023-11-243-1/+147
| | | | | | | | | qmi is useful for cellular modem connection, the management interface is implemented using libqmi's qmicli utility. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://github.com/gentoo/netifrc/pull/44
* iwd: depend on "program /usr/libexec/iwd" instead of "program iwd"Violet Purcell2023-11-241-1/+1
| | | | | | | | | | | In iwd.sh, the iwd executable used is /usr/libexec/iwd, however in the dependency block it depends on just "program iwd." Since iwd is not in PATH, this will fail and cause iwd to not be started when it should be. Correct this to /usr/libexec/iwd. Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://github.com/gentoo/netifrc/pull/49
* Makefile.inc: prepare for 0.7.70.7.7Sam James2023-10-201-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* dhcpcd: Fixing the handling of dhcpcd arguments with spaceskmartin362023-10-191-2/+2
| | | | | | | | Bug: https://bugs.gentoo.org/881039 Signed-off-by: Kevin Martin <kevinmbecause@gmail.com> Fixes: bd8ff4aa89e1d56e9886dad32bb2406c8f43c747 Closes: https://github.com/gentoo/netifrc/pull/48 Signed-off-by: Sam James <sam@gentoo.org>
* Makefile.inc: prepare for 0.7.60.7.6Sam James2023-09-101-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* net/bonding.sh: fix spelling of "lose"Mike Gilbert2023-09-101-1/+1
| | | | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/netifrc/pull/47 Signed-off-by: Sam James <sam@gentoo.org>
* Remove absolute paths from commandsMike Gilbert2023-09-1024-70/+61
| | | | | | | Bug: https://bugs.gentoo.org/889922 Bug: https://bugs.gentoo.org/893290 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* Makefile.inc: version 0.7.50.7.5Mike Gilbert2023-05-281-1/+1
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Update pidfile path for ppp-2.5.0Mike Gilbert2023-05-281-8/+30
| | | | | Bug: https://bugs.gentoo.org/907311 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* net/Makefile: include iwdRobin H. Johnson2023-04-191-1/+1
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* doc/net.example.Linux.in: add hsr examplesRobin H. Johnson2023-04-191-0/+2
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Makefile.inc: crank to 0.7.40.7.4Sam James2023-04-171-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* mk/dist.mk: use xzSam James2023-04-171-4/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* mk/dist.mk: use gtar for --ownersSam James2023-04-171-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* net/dhcpcd.sh: adapt to dhcpcd-10 versioningGreg Kubaryk2023-04-171-1/+1
| | | | | | Closes: https://bugs.gentoo.org/904422 Signed-off-by: Greg Kubaryk <kurly@vt.edu> Signed-off-by: Sam James <sam@gentoo.org>
* net/arping.sh: adapt to new arping path in /usr/binSam James2023-02-121-1/+1
| | | | | Bug: https://bugs.gentoo.org/893290 Signed-off-by: Sam James <sam@gentoo.org>
* net/iproute2.sh: Fix two regressions in _get_mac_addressKerin Millar2023-01-191-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Commit 4143e26 re-introduced the ip(8) parser in the course of adding network namespace support. In doing so, it also introduced two regressions. Firstly, in the case that no MAC address is successfully discerned, the function will return 0. Secondly, FF:FF:FF:FF:FF:FF is no longer handled as a special case. This patch, once again, does away with the ip(8) parser and, instead, collects the address from sysfs. The _netns function is used to ensure that the procedure is carried out within the applicable network namespace, if necessary. In the event that the address file cannot be read, or that it contains nothing, the function will now return 1, which addresses the first issue. The second issue is addressed by uppercasing the applicable case pattern. As an aside, this patch also addresses an issue whereby sed(1) was used to match against a pattern containing \< and \>, which are GNU-specific extensions. Fixes: 4143e26dd4a56c08fbb99e18913eaafaf2a04f32 Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Don't try to evaluate l2tptunnel_${IFVAR} if unsetKerin Millar2023-01-191-2/+4
| | | | | | | | | | | The "restructuring" commit went one step too far by combining the test for whether l2tptunnel_${IFVAR} is defined with the test for whether the tunnel exists, in a way that adversely affects the outer control flow. Fix it by nesting the latter test. Fixes: 0b8b9b13146c1eba04f2bd8d0b2b049c03891010 Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/wpa_supplicant.sh: Properly expand the number of positional parametersKerin Millar2023-01-171-1/+1
| | | | | | | ${#*} is undefined behaviour. Just write it as $#. Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/veth.sh: Eliminate the bashism that is the == test operatorKerin Millar2023-01-171-1/+1
| | | | | Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/bonding.sh: Eliminate the bashism that is pattern substitutionKerin Millar2023-01-171-1/+1
| | | | | Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Really favour IFACE over IFVAR in an informational messageKerin Millar2023-01-151-1/+1
| | | | | | | | | | The previous commit intended to replace an instance of IFVAR with IFACE. Instead, it replaced with IFNAME, which means nothing to netifrc. Frustratingly, I had realised my error at the time of submitting the patch, yet still managed to attach a bad one. Make it right. Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Favour IFACE over IFVAR in an informational messageKerin Millar2023-01-151-1/+1
| | | | | | | | IFVAR is (supposed to be) requoted for injection, so it doesn't make any sense to expand it within the second argument given to eend. Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Slightly improve the structure of l2tp_pre_start()Kerin Millar2023-01-151-21/+19
| | | | | | | | Restructure so as to avoid an unnecessary level of indentation. The behaviour of the function remains the same. Signed-off-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* net/macchanger.sh: Update path to macchanger to /usr7e3f2023-01-151-2/+2
| | | | | | | | | | | | | | | Proposing changes in diff from bug #889922, net-analyzer/macchanger-1.7.0_p5_p4 to net-analyzer/macchanger-1.7.0_p5_p4-r1 changed softlink and binary location due to #886121. There was a temporary tidy up in net-analyzer/macchanger-1.7.0_p5_p4-r2, but proposing macchanger.sh change to allow netifrc to work with macchanger binary location. Bug: https://bugs.gentoo.org/886121 Bug: https://bugs.gentoo.org/889922 Closes: https://github.com/gentoo/netifrc/pull/42 Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Re-order function declarations and use a consistent brace styleKerin Millar2023-01-151-86/+82
| | | | | | | | | This is how I would initially have submitted it, only I wanted for the initial set of changes to be legible as a unified diff. Signed-off-by: Kerin Millar <kfm@plushkava.net> Bug: https://bugs.gentoo.org/890238 Signed-off-by: Sam James <sam@gentoo.org>
* net/l2tp.sh: Rewrite to address issues of POSIX conformance (and more besides)Kerin Millar2023-01-151-143/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that awk(1) is used portably throughout. Eliminate the use of ${parameter^^} expansion syntax, which is a bashism. Delegate netfirc parameter parsing to xargs(1) and awk(1). The potential for code injection is thus eliminated, to the extent that is currently possible in netifrc. It also eliminates potential issues pertaining to word splitting and unintentional pathname expansion. Add additional sanity checks and increase the rigour of those that exist. For instance, blank values are no longer permitted and the tunnel_id parameter must match that of l2tpsession_*, in the case that l2tptunnel_* is defined. Add additional diagnostic messages while improving the clarity of those that already existed. This is achieved in some instances by being more precise and, in others, through the use of English that exhibits greater formality and consistency. At least one grammatical error was rectified. Simplify and refine the code in terms of both structure and syntax, and greatly reduce the number of (local) variables. As a byproduct, all complaints previously raised by shellcheck have been eliminated, save for the use of local, whose behaviour is not defined by POSIX. I have not attempted to eliminate the use of local because, for now, it continues to be used extensively throughout the netifrc codebase. Honour the exit status value of ip(8) for the "add" and "del" verbs, rather than parse STDERR. Optimise l2tp_post_stop() by refraining from executing ip(8) and awk(8) in the case that the interface cannot be identifed as a virtual one. Further, do not attempt to destroy the tunnels associated with an identified session in the case that the attempt to destroy the session has failed. Signed-off-by: Kerin Millar <kfm@plushkava.net> Bug: https://bugs.gentoo.org/890238 Signed-off-by: Sam James <sam@gentoo.org>
* net/hsr: add Parallel Redundancy Protocol (PRP) supportRobin H. Johnson2022-12-251-1/+6
| | | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Reference: https://github.com/gentoo/netifrc/pull/38
* Adding the saved args to the stop commandkmartin362022-12-251-2/+2
| | | | | | | | Closes: https://bugs.gentoo.org/881039 Signed-off-by: Kevin Martin <kevinmbecause@gmail.com> (cherry picked from commit 0e1c19959a6d82accdb57fa7a1f5b0036037a001) Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Closes: https://github.com/gentoo/netifrc/pull/41
* Merge remote-tracking branch 'github/pr/32'Robin H. Johnson2021-04-050-0/+0
|\ | | | | | | | | Closes: https://github.com/gentoo/netifrc/pull/32 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
| * Added macvtap supportArseni Nimera2020-05-312-2/+9
| | | | | | | | | | Bug: https://bugs.gentoo.org/691372 Signed-off-by: Arseni Nimera <shorrer@yandex.by>