Bug 161765 - net/relayd: relayd fails to initialize on systems without IPv6 in kernel
Summary: net/relayd: relayd fails to initialize on systems without IPv6 in kernel
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
: 192274 (view as bug list)
Depends on:
Reported: 2011-10-18 10:40 UTC by Damien Fleuriot
Modified: 2021-05-30 17:06 UTC (History)
5 users (show)

See Also:

kdump (131.01 KB, text/plain)
2014-09-09 09:23 UTC, Damien Fleuriot
no flags Details
truss (12.99 KB, text/plain)
2014-09-09 09:24 UTC, Damien Fleuriot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damien Fleuriot 2011-10-18 10:40:08 UTC
When trying to start relayd 4.6 on a host without INET6 in the kernel, relayd exits with an error that I'm sadly unable to recall.

The error may have been with check_icmp.c in function icmp_setup() starting at line 54:
icmp_setup(struct relayd *env, struct ctl_icmp_event *cie, int af)
        int proto = IPPROTO_ICMP;

        if (af == AF_INET6)
                proto = IPPROTO_ICMPV6;
        if ((cie->s = socket(af, SOCK_RAW, proto)) < 0)
                fatal("icmp_init: socket");
        socket_set_blockmode(cie->s, BM_NONBLOCK);
        cie->env = env;
        cie->af = af;

This was present on 4.6, I can't confirm for 5.0 as the host now has INET6 compiled in the kernel.


Not sure if this is an actual bug, or intended.
How-To-Repeat: On a 8.2-RELEASE box, build a custom kernel without INET6 support (disable IPv6).

Build relayd, try to start.
Comment 1 Edwin Groothuis freebsd_committer 2011-10-19 02:28:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Carlo Strub freebsd_committer 2014-09-07 19:59:27 UTC
Is this PR still relevant?
Comment 3 Damien Fleuriot 2014-09-09 09:23:35 UTC
Created attachment 147100 [details]
Comment 4 Damien Fleuriot 2014-09-09 09:24:06 UTC
Created attachment 147101 [details]
Comment 5 Damien Fleuriot 2014-09-09 09:28:40 UTC
Still doesn't work on 8.4-STABLE synched and built today 09/09/2014.

Removed INET6 from kernel, relayd won't start anymore.

Both /usr/local/etc/rc.d/relayd start and /usr/local/sbin/relayd exit with code 0 and no error message.

However, /var/log/messages reveals :
Sep  9 09:15:51 bsd8 relayd[981]: fatal: icmp_setup: socket: Protocol not supported

"icmp_setup" seems to be referenced only in :
Comment 6 Daniel Gerzo freebsd_committer 2015-01-15 19:46:50 UTC
this is till valid for  FreeBSD 10.1-STABLE #3 r274924M, probably needs to be fixed in the relayd itself.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-01-17 09:38:04 UTC
Is this still relevant?
Comment 8 Damien Fleuriot 2018-01-17 13:50:19 UTC
To be honest, unless check_icmp.c was changed, aye it is very likely still relevant.

Can test on 10-STABLE sometime next week if needed.
Comment 9 Martin Matuska freebsd_committer 2019-03-18 22:49:51 UTC
I give up maintaining this port.
Comment 10 Carlo Strub freebsd_committer 2019-04-28 08:18:53 UTC
*** Bug 192274 has been marked as a duplicate of this bug. ***