summaryrefslogtreecommitdiffstats
path: root/avahi-core/iface-linux.c
Commit message (Collapse)AuthorAgeFilesLines
* iface: look for both IFA_ADDRESS and IFA_LOCALLennart Poettering2011-04-021-8/+29
| | | | | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617948 http://avahi.org/ticket/333
* core: avahi on Linux uses incorrect address for P-t-P interfaceMatt Ginzton2011-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, I sent a less knowledgeable question about avahi-daemon and point-to-point links a few days ago, http://lists.freedesktop.org/archives/avahi/2011-January/001969.html. When I didn't get a response to this, I decided to build avahi from source and step through it and see how it builds its list of interfaces and their addresses. This is in iface-linux.c, netlink_callback(). It looks for a RTM_NEWADDR message, then extracts the payload of type IFA_ADDRESS. Short story: I think it should be using the payload of type IFA_LOCAL, not the payload of type IFA_ADDRESS. In the VM where I was running these experiments, there are 3 interfaces -- lo, eth0 and tun0. I printed out the IFA_ADDRESS and IFA_LOCAL for all 3 of these; for lo and eth0 these are the same address; for tun0 (IFF_POINTOPOINT), IFA_ADDRESS is the remote end and IFA_LOCAL is the local end. I'm no expert on Linux rtnetlink or these IFA fields, but quoting /usr/include/linux/if_addr.h: /* * Important comment: * IFA_ADDRESS is prefix address, rather than local interface address. * It makes no difference for normally configured broadcast * interfaces, * but for point-to-point IFA_ADDRESS is DESTINATION address, * local address is supplied in IFA_LOCAL attribute. */ See also this stackoverflow question/answer: http://stackoverflow.com/questions/4678637/what-is-difference-between-ifa-local-and-ifa-address-in-rtnetlink-linux Does anyone know why avahi is looking for IFA_ADDRESS here, and whether there's any reason not to use IFA_LOCAL instead? Assuming there's not a specific reason to use IFA_ADDRESS here, I propose the patch attached at the end of this message, which works for me. (The bug this fixes is described in the earlier message linked above -- avahi chooses the wrong address to associate with the P-t-P interface, and if you enable avahi's reflector, avahi tries to call sendmsg() using that as the source address and the kernel always, correctly, fails the sendmsg() call with EINVAL.) (And when/why this changed -- I was able to use avahi over P-t-P interfaces on Linux several years ago; I don't know what avahi version I was using at the time.) thanks, Matt
* netlink: fix wrong use of netlink flags for dump operationsPablo Neira Ayuso2011-02-181-1/+1
| | | | | | | | | The avahi-daemon uses a wrong flag combination to operate with rtnetlink. This patch fixes the problems. No need to set NLM_F_ACK since the dump operation already includes the trailing NLMSG_DONE message that informs about the end of the dump operation.
* iface: check for IFA_F_DEPRECATEDLennart Poettering2010-06-281-0/+1
| | | | http://avahi.org/ticket/211
* get rid of a lot of old svn cruftLennart Poettering2010-06-251-2/+0
|
* from now on we enforce a strict whitespace regimeLennart Poettering2010-06-251-21/+21
|
* * Really actually fix build on Linux <2.6.19Trent Lloyd2006-12-121-4/+4
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1339 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Fix specifying priviliged access group (Closes: #85)Trent Lloyd2006-12-111-1/+2
| | | | | | | | | | | | Thanks to delphinidae * Fix incorrect manual reference (Closes: #83) Thanks to delphinidae * Fix incorrect assert() in client-publish-service.c (Closes: #79) Thanks to tedp * Fix builds on < 2.6.19 (temporary fix, pending possible "better" solution) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1337 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Revert previous patch to check nlmsg_pid as it is bogus and breaksTrent Lloyd2006-12-111-0/+9
| | | | | | | | | | | in many cases, notably when using NetworkManager * Replace with new SO_PASSCRED-based check of the sending UID, which seems to work better * Apply for for 2.6.19+ where IFA_RTA / IFLA_RTA is no longer defined * Mild fix to some doxygen docs for avahi-common/address.h git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1336 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add an option to make avahi-daemon using POINTOPOINT interfaces (disable ↵Sebastien Estienne2006-02-191-1/+1
| | | | | | by default) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1146 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * rename all limit defs so that they end with _MAXLennart Poettering2005-10-241-2/+2
| | | | | | | * fix some minor typos git-svn-id: file:///home/lennart/svn/public/avahi/trunk@863 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* fix avahi_interface_monitor_sync() for the linux NETLINK implementationLennart Poettering2005-10-241-2/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@860 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* slightly more commentsLennart Poettering2005-10-171-4/+18
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@793 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Some minor cleanups in netlink codeLennart Poettering2005-10-151-13/+95
| | | | | | | * add some comments to iface-linux.c, to ease porting for sebest git-svn-id: file:///home/lennart/svn/public/avahi/trunk@762 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Split off linux specific parts of iface.[ch] into iface-linux.[ch]. This shouldLennart Poettering2005-10-111-0/+266
ease porting to other platforms. Sebest, Lathiat this is for you! It Should simplify your porting work to *BSD/MacOSX/Solaris. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@726 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe