Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2012 12:59:11 GMT
From:      "Andre Gustavo N. Lopes" <andre@mrx.com.br>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/172880: lldp (openlldp) triggers failures when the system has carp interfaces.
Message-ID:  <201210191259.q9JCxBho002327@red.freebsd.org>
Resent-Message-ID: <201210191300.q9JD02M5011469@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172880
>Category:       kern
>Synopsis:       lldp (openlldp) triggers failures when the system has carp interfaces.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 19 13:00:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andre Gustavo N. Lopes
>Release:        8.3-STABLE
>Organization:
MRX
>Environment:
FreeBSD rtdistdc02.datacast.net.br 8.3-STABLE FreeBSD 8.3-STABLE #3: Fri Oct 19 09:31:59 BRT 2012     root@rtdistdc02.datacast.net.br:/usr/obj/usr/src/sys/DELLR410-v2  amd64
>Description:
It looks like the lldp protocol (openlldp) triggers the below error when the system has a carp interface:

..
carp_looutput: af=1 unexpected
carp_looutput: af=1 unexpected
carp_looutput: af=1 unexpected
..

Investigating a little bit I've found this in /usr/src/sys/net/netinet/ip_carp.c:

carp_looutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
    struct route *ro)
{
..
#if 1   /* XXX */
        switch (dst->sa_family) {
        case AF_INET:
        case AF_INET6:
        case AF_IPX:
        case AF_APPLETALK:
                break;
        default:
                printf("carp_looutput: af=%d unexpected\n", dst->sa_family);
                m_freem(m);
                return (EAFNOSUPPORT);
        }
..
}

It looks like the switch (dst->sa_family) is returning 1 (dmesg log says: carp_looutput: af=1 unexpected). 

I thought I could just ignore this (and comment the printf out, but after some hours lldp consumes a bunch of swap and eventually dies:

..
swap_pager_getswapspace(2): failed
swap_pager_getswapspace(16): failed
pid 2628 (lldpd), uid 0, was killed: out of swap space

I wonder if ip_carp.c, when checking the address_family was not supposed to  accomodate the lldp packages.


>How-To-Repeat:
1- Create a carp interface, no peer required, any ip address
2- Install and install openlldp
3- Follow up dmesg and logs
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210191259.q9JCxBho002327>