[avahi] [PATCH] [RFC] Untested bind to ipaddress (interface)

Stefan de Konink avahi at ml.kinkrsoftware.nl
Sat May 10 15:47:01 PDT 2008


Hello,


A small three hours ago I spoke with trs80 on IRC. Asking him about the 
possibility to bind avahi to a specific interface. This functionality I 
had just added to libvirt, and because of security reasons I would like 
to have this in every package I run on my cluster.

The option to disable multicast sounds attractive, but is not reliable 
for me. I started hacking and I come up with an *untested* patch, it 
compiles but I have my question marks with its working.


My guess is the code in main.c, wide-area.c, core.h, server.c will work.
(Minor questionmark about "::", but I guess that would be valid.)


The real work in socket.c need to be checked, especially if I can get 
away with:
ipv4_address_to_sockaddr(&local, bind_ipv4, 0);
ipv6_address_to_sockaddr(&local, bind_ipv6, 0);


I'll check the working tomorrow myself, but it is now a bit late for 
more hacking. Attached is the patch, I removed core.h from socket.c 
because I presume this was eventually a non essential include.


Anyone how wants to improve it or test it, be my guest.


Since it is my first commit:


By making a contribution to this project, I, Stefan de Konink, certify
that:

(a) The contribution was created in whole or in part by me and I have 
the right to submit it under the open source license indicated in the 
file; or

(b) The contribution is based upon previous work that, to the best of my 
knowledge, is covered under an appropriate open source license and I 
have the right under that license to submit that work with 
modifications, whether created in whole or in part by me, under the same 
open source license (unless I am permitted to submit under a different 
license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person 
who certified (a), (b) or (c) and I have not modified it; and

(d) In the case of each of (a), (b), or (c), I understand and agree that
this project and the contribution are public and that a record of the 
contribution (including all personal information I submit with it, 
including my sign-off) is maintained indefinitely and may be 
redistributed consistent with this project or the open source license 
indicated in the file.


Signed-off-by: Stefan de Konink <dekonink at kinkrsoftware.nl>



Yours Sincerely,

Stefan de Konink
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avahi-bind.patch
Url: http://lists.freedesktop.org/archives/avahi/attachments/20080511/3e57bf2c/attachment.txt 


More information about the avahi mailing list