ifdepd implements dependencies between network interfaces in a
reliable way. If any of the source interfaces fails, ifdepd sets all
destination interfaces to state down. If all source interfaces are active,
ifdepd sets all destination interfaces to state up.
For example, it can be used with carp(4) to provide failover functionality
on gateways/firewalls.
ifdepd is a simple replacement for ifstated and was written because of problems
with ifstated.
Alexander Hausner <alex@hugo.bmg.gv.at>
To run ifdepd from startup, add
ifdepd_enable="YES" to /etc/rc.conf
Available variables you add/set to /etc/rc.conf.
- ifdepd_enable (bool): Set to "NO" by default.
Set it to "YES" to enable ifdepd.
- ifdepd_src_ifaces(str): Set to "" by default.
Contains a space separated list
of source interfaces.
- ifdepd_dst_ifaces(str): Set to "" by default.
Contains a space separated list
of destination interfaces.
net/ifdepd: fix clang 13 warnings and non-static inline functions
Building net/ifdepd with clang and lld 13 results in a few warnings, and
a link error:
cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall
-Wnested-externs -Wpointer-arith -Winline -Wcast-qual -Wredundant-decls -c
ifdepd.c -o ifdepd.o
ifdepd.c:420:4: warning: misleading indentation; statement is not part of the
previous 'if' [-Wmisleading-indentation]
free(d_ints);
^
ifdepd.c:418:2: note: previous statement is here
if (D)
^
ifdepd.c:434:4: warning: misleading indentation; statement is not part of the
previous 'if' [-Wmisleading-indentation]
free(s_ints);
^
(Only the first 15 lines of the commit message are shown above )
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
- Fix a syntax error in the ifdepd startup script
- Bump PORTREVISION
- Remove the MD5 checksum from distinfo
PR: ports/152397
Submitted by: Alexander Hausner <alex@hugo.bmg.gv.at> (maintainer)
Tune up the rc.d script a little:
1. Add a $FreeBSD Id
2. Remove the spurious FreeBSD KEYWORD
3. s#/etc/rc.subr#%%RC_SUBR%%#
4. s#/usr/local#%%PREFIX%%#
5. Move load_rc_config to after the method definition and move
the default _enable assignment after it.
6. The _stop method was a less efficient version of the default, so remove it
ifdepd implements dependencies between network interfaces in a
reliable way. If any of the source interfaces fails, ifdepd sets all
destination interfaces to state down. If all source interfaces are active,
ifdepd sets all destination interfaces to state up.
For example, it can be used with carp(4) to provide failover functionality
on gateways/firewalls.
ifdepd is a simple replacement for ifstated and was written because of problems
with ifstated.
PR: ports/78819
Submitted by: Alexander Hausner <alex@hugo.bmg.gv.at>