OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: Perun on February 24, 2018, 10:53:01 am

Title: Bug? CARP and Bridge interface
Post by: Perun on February 24, 2018, 10:53:01 am
Hi,

there seems to be a problem/bug with CARP on bridge interfaces.

I get this message at boot: "Sorry but we could not find a required assigned ip address on the interface for the virtual IP" for the CARP on my bridge interface.

Code: [Select]
if (is_ipaddrv4($vip['subnet'])) {
        /* Ensure a IP on this interface exists prior to configuring CARP. */
        $ww_subnet_ip = find_interface_ip($realif);
        if (!is_ipaddrv4($ww_subnet_ip)) {
            file_notice("CARP", sprintf(gettext("Sorry but we could not find a required assigned ip address on the interface for the virtual IP address %s."), $vip['subnet']), "Firewall: Virtual IP", "");
            return;
        }

Could the CARP be 'to early' and the bridge doesnt have ip configured already?

Greetz
Title: Re: Bug? CARP and Bridge interface
Post by: Perun on February 24, 2018, 03:21:06 pm
if I disable and enable CARP then it works correctly... hmmm as a wourkaround I could make it after reboot with a command.
But how can I do it? is there something like rc.local (linux) on freebsd? and what is the console command for disable/enable CARP?
Title: Re: Bug? CARP and Bridge interface
Post by: Perun on February 24, 2018, 05:20:33 pm
I've done a workaround with /usr/local/etc/rc.syshook.d/99-own_carp.start:

Code: [Select]
#!/bin/sh

/sbin/ifconfig bridge0 vhid 50 advbase 30 advskew 100 pass mypass alias 192.168.50.2/24

can someone confirm this is ok as workaround?

Greetz
Title: Re: Bug? CARP and Bridge interface
Post by: franco on February 28, 2018, 08:29:32 am
Hi Perun,

Looks reasonable.


Cheers,
Franco
Title: Re: Bug? CARP and Bridge interface
Post by: Perun on April 01, 2018, 10:30:29 am
it doesnt work really good :(

it seems to be a bug in freebsd:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200319

it is possible to include the patch in opnsense?
Title: Re: Bug? CARP and Bridge interface
Post by: franco on April 04, 2018, 07:45:53 am
I subscribed to that thread. Will watch for activity. So far no FreeBSD commit.


Cheers,
Franco