Date: Wed, 6 Jul 2011 21:44:04 +0000 (UTC) From: Geoffrey Sisson <geoff@dns-oarc.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/158697: radvd doesn't listen for Router Solicitations Message-ID: <20110706214404.BA6D2BDF48@mail.dns-oarc.net> Resent-Message-ID: <201107062210.p66MA7C4074066@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 158697 >Category: ports >Synopsis: radvd doesn't listen for Router Solicitations >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 06 22:10:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Geoffrey Sisson <geoff@dns-oarc.net> >Release: radvd-1.8 (net/radvd) >Organization: DNS-OARC (http://www.dns-oarc.net/) >Environment: System: FreeBSD dns-tender.dns-oarc.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Wed May 11 00:24:33 UTC 2011 root@dns-tender.dns-oarc.net:/usr/obj/usr/src/sys/DNS-TENDER amd64 Version: radvd-1.8 >Description: radvd doesn't listen for Router Solicitations even when "AdvSendAdvert" is set to "on". The function setup_allrouters_membership in device-bsd44.c is just a stub that effectively performs a NOP when establishing a listen socket. The same function in device-linux.c contains a setsockopt call that causes radvd to join the all-routers multicast group. While ignoring RS messages isn't fatal (unconfigured hosts will eventually see an RA message), it is contrary to RFC 2461: A router MUST join the all-routers multicast address on an advertising interface. [Section 6.2.2] >How-To-Repeat: Send Router Solicitations from a host to a FreeBSD router running radvd. tcpdump -i <interface> dst host \( ff02::1 or ff02::2 \) will show unanswered Router Solicitations. >Fix: Patch attached. Note that this patch is only partial. The function check_allrouters_membership in device-bsd44.c also needs attention. ------------------------ Begin included text ------------------------ --- radvd-1.8/device-bsd44.c.orig 2011-07-06 20:19:40.000000000 +0000 +++ radvd-1.8/device-bsd44.c 2011-07-06 20:30:37.000000000 +0000 @@ -189,6 +189,24 @@ int setup_allrouters_membership(struct Interface *iface) { + struct ipv6_mreq mreq; + + memset(&mreq, 0, sizeof(mreq)); + mreq.ipv6mr_interface = iface->if_index; + + /* all-routers multicast address */ + if (inet_pton(AF_INET6, "ff02::2", + &mreq.ipv6mr_multiaddr.s6_addr) != 1) { + flog(LOG_ERR, "inet_pton failed"); + return (-1); + } + + if (setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, + &mreq, sizeof(mreq)) < 0) { + flog(LOG_ERR, "can't join ipv6-allrouters on %s", iface->Name); + return (-1); + } + return (0); } ------------------------- End included text ------------------------- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110706214404.BA6D2BDF48>