Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Apr 2016 11:57:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 208652] [PATCH] net/mdns-repeater: bind to proper interface; strerror
Message-ID:  <bug-208652-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208652

            Bug ID: 208652
           Summary: [PATCH] net/mdns-repeater: bind to proper interface;
                    strerror
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ehaupt@FreeBSD.org
          Reporter: johan@stromnet.se
 Attachment #169123 maintainer-approval?
             Flags:
          Assignee: ehaupt@FreeBSD.org
          Keywords: patch
             Flags: maintainer-feedback?(ehaupt@FreeBSD.org)

Created attachment 169123
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D169123&action=
=3Dedit
Patch to fix interface binding & error messages on FreeBSD.

The net/mdns-repeater port is supposed to read one mDNS multicast packet fr=
om
one interface, and forward it to one or more interfaces.

On FreeBSD it does not properly bind each sending socket to their correspon=
ding
interface, instead it just sends to multi-cast IP 244.0.0.251, which is emi=
tted
on the interface found via the default route (at least that was the case he=
re).
In my case this was my internet interface, resulting in all packets getting
blocked by my firewall (and not sent at all to the proper interfaces).
Not sure if this have ever worked on a multi-homed machine, but perhaps all=
 the
users have wanted it to forward to the interface with the default route, and
assumed it was fine.

The existing code solves this with the Linux-specific SO_BINDTODEVICE opt, =
if
it exists. It doesn't on FreeBSD.
The attached patch fixes this by using the IP_MULTICAST_IF socket option
instead.

The patch also replaces the use of GNU-specific %m formatter (expands to
strerror(errno)). While this works on FreeBSD syslog(3), it does not work on
FreeBSD printf(3).

Patch built with make makepatch.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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