summaryrefslogtreecommitdiffstats
path: root/avahi-core/socket.c
Commit message (Collapse)AuthorAgeFilesLines
* socket: minor beautificationLennart Poettering2011-04-041-2/+2
|
* iface: use interface values only when validLennart Poettering2011-04-021-5/+9
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=690416
* socket: Still read corrupt packets from the socketsVincent Untz2011-02-181-10/+11
| | | | | | | Else, we end up with an infinite loop with 100% CPU. http://www.avahi.org/ticket/325 https://bugzilla.redhat.com/show_bug.cgi?id=667187
* socket: ignore EINTR on sendmsg()Lennart Poettering2010-06-251-0/+3
|
* get rid of a lot of old svn cruftLennart Poettering2010-06-251-2/+0
|
* socket: ignore packet if FIONREAD returns zeroLudwig Nussel2010-06-251-0/+8
| | | | | | zero size is reported for corrupt packets. recvmsg() later could nevertheless get data from a good packet that followed the bad one. So get out early to avoid hitting an assertion.
* fix detection whether an interface has a routable address assigned on BSD. ↵Lennart Poettering2007-12-161-1/+5
| | | | | | Patch from zml. Closes #166 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1591 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* work around yet another bsd limitation: prefer IP_MULTICAST_IF over ↵Lennart Poettering2007-12-161-9/+9
| | | | | | IP_SENDSRCADDR. Patch from zml. Closes #163 git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1590 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* fix usage of CMSG macros to fix portability to 64 systems. Identified by ↵Lennart Poettering2007-10-261-101/+95
| | | | | | David C Thompson git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1560 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Spelling/grammar corrections (all trivial)Ted Percival2007-09-281-2/+2
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1544 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * set IPV6_V6ONLY for unicast DNS sockets, tooLennart Poettering2007-01-061-7/+38
| | | | | | | * print a warning when FIONREAD returns an invalid size git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1370 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Some more ia64 fixes. (Closes #90)Lennart Poettering2007-01-041-3/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1363 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Ignore EAGAIN errors on recvmsg() (Closes #60)Lennart Poettering2006-12-311-2/+22
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1361 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* P_RECVIF portability for SolarisLennart Poettering2006-06-221-0/+4
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1226 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* fix sendmsg() calls on FreeBSD and AMD64 kernels with 32bit userspace. ↵Lennart Poettering2006-05-041-16/+27
| | | | | | (Closes #35 and #19) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1207 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Patch from Padraig O'Briain <Padraig.Obriain@sun.com> to build avahi on SolarisSebastien Estienne2006-05-021-0/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1206 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* make the construction of the ancillary data for sendmsg() a bit more robust. ↵Lennart Poettering2006-04-241-3/+5
| | | | | | (see #32) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1199 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* Patch from sjoerd simons to close Ticket #19 (Doesn't work on 64 bit ↵Sebastien Estienne2006-03-171-3/+3
| | | | | | machines with 32 bit userspace) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1178 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* add membership hack for IPv6, tooLennart Poettering2006-02-101-1/+7
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1132 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * fix bug where avahi-daemon wasn't working anymore after the iface went ↵Sebastien Estienne2006-02-101-0/+3
| | | | | | down/up git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1131 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* merge ia64 fixes from Jason Vas DiasLennart Poettering2006-02-091-5/+5
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1130 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add support for IP_SENDSRCADDR on freeBSDSebastien Estienne2005-11-091-3/+25
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@945 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * set IP_MULTICAST_IF for *BSDSebastien Estienne2005-11-091-4/+7
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@943 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * small fixesSebastien Estienne2005-11-031-3/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@925 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* rework and cleanup socket handling to improve support for OS that don't ↵Lennart Poettering2005-11-031-65/+102
| | | | | | support a SO_RECVIF equivalent git-svn-id: file:///home/lennart/svn/public/avahi/trunk@923 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * Always specfify the local IP address when joining mcast groups. This ↵Lennart Poettering2005-11-011-10/+13
| | | | | | increases compatibility with *BSD and is smoother on other systems, too git-svn-id: file:///home/lennart/svn/public/avahi/trunk@921 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * small fix in the #includesSebastien Estienne2005-10-311-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@909 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * many trivial fix to make avahi compile on OpenBSDSebastien Estienne2005-10-281-3/+6
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@903 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replace AF_UNSPEC by AVAHI_PROTO_UNSPEC in client-test.cLennart Poettering2005-10-251-1/+0
| | | | | | | | | * remove some functions from the public API in avahi-common/{domain,address}.[ch] and move them into avahi-core/{domain-util,add-util}.[ch] * properly generate CNAME responses * add some more comments to server.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@871 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* add a compiler warning that avahi_send_dns_packet_ipv4() still misses ↵Lennart Poettering2005-10-251-3/+4
| | | | | | support for setting the outgoing interface on everythng but Linux git-svn-id: file:///home/lennart/svn/public/avahi/trunk@866 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * change setsocktopt for IP_TTL to use an int instead of an uin8_t for ↵Lennart Poettering2005-10-241-3/+3
| | | | | | compatibility with non-linux systems git-svn-id: file:///home/lennart/svn/public/avahi/trunk@858 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* cleanup socket.c a littleLennart Poettering2005-10-241-111/+91
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@857 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* unrbeak IPv6 support: change ttl value size back to 32 bit for ipv6 Lennart Poettering2005-10-241-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@853 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* fix IP_TTL/IP_RECVTTL on linuxLennart Poettering2005-10-241-3/+2
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@852 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* many cleanups in preperation of the netbsd portLennart Poettering2005-10-241-69/+83
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@851 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * correctly handle empty domain names (i.e. the root zone)Lennart Poettering2005-10-231-6/+6
| | | | | | | | | | | | | | * fix memory initialization error in wide-area.c * make server_add_xx() functions atomic, i.e. clean up half-created entries on failure * add some more validity checking macros and change everything to make use of them * clean up avahi_server_add_address() * change some functions from domain.[ch] to work on a stack buffer instead of malloced memory * update avahi-test.c a little * replace avahi_reverse_lookup_name_{ipv4,ipv6}() with a single function avahi_reverse_lookup_name() * remove avahi_server_add_dns_server_name() from public API git-svn-id: file:///home/lennart/svn/public/avahi/trunk@845 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * added a missing include in dbus-protocol.cSebastien Estienne2005-10-211-0/+8
| | | | | | | | * added REUSEPORT in socket.c * cosmetic cleaning in iface-pfroute.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@836 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * removed bogus IP_RECVIFSebastien Estienne2005-10-211-24/+3
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@835 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* remove htonl() that shouldn't be thereLennart Poettering2005-10-211-1/+1
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@833 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* handle architectures that miss "struct ip_mreq" betterLennart Poettering2005-10-201-84/+18
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@832 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * preliminary ipv6 support for BSDSebastien Estienne2005-10-201-1/+45
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@831 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * bug fix in run_versionedSebastien Estienne2005-10-201-4/+4
| | | | | | | | * bug fix in socket.c and cosmectic change * use uname instead of MACHTYPE in bootstrap.sh git-svn-id: file:///home/lennart/svn/public/avahi/trunk@830 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replaced some ioctl by if_nametoindex and if_indextonameSebastien Estienne2005-10-191-2/+2
| | | | | | | * cosmetic fix in socket.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@829 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * handle cmsg_type IP_RECVTTLSebastien Estienne2005-10-181-0/+6
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@808 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * more portability work on socket.cSebastien Estienne2005-10-141-33/+128
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@760 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * portability function for IP_PKTINFOSebastien Estienne2005-10-121-8/+36
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@748 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * added a portability fix for IPV6_ADD/DROP_MEMBERSHIPSebastien Estienne2005-10-121-0/+13
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@736 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * replaced SOL_IP by IPPROTO_IP as it seems more portableSebastien Estienne2005-10-111-22/+22
| | | | git-svn-id: file:///home/lennart/svn/public/avahi/trunk@730 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * add option to not enable SO_REUSEADDR for multicast sockets, effectively ↵Lennart Poettering2005-09-281-44/+54
| | | | | | | | | | disallow multiple mDNS stacks running simultaneously * add a config file option for this and enable it by default * remove some bad \n in log messages git-svn-id: file:///home/lennart/svn/public/avahi/trunk@646 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
* * split off lookup.h and publish.h from core.hLennart Poettering2005-09-251-59/+85
| | | | | | | | | | | | | * implement wide-area DNS-SD * if multiple clients query the same records, only start the query packet sequence once * implement recursive CNAME queries * add support for resolving services without TXT or A/AAAA records * enlarge resolving timeouts to 5s * implement new browse/resolving events CACHE_EXHAUSTED/ALL_FOR_NOW * add support for resolving services without name. (i.e. for normal SRV records) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@608 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe