summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-08-02Add simple systemd service fileTobias Klauser1-0/+11
Add a simple example of a systemd service file as a base for e.g. distribution service files. Fixes #3 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02llmnrd: Update copyrightTobias Klauser1-2/+2
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02llmnr-query: Allow to set LLMNR transaction idTobias Klauser1-3/+8
Allow to override the transaction id in the LLMNR query header. Default value is 0. The id will be incremented for consecutive queries (i.e. count > 1). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02llmnr-packet: Correct LLMNR RFC numberTobias Klauser1-4/+4
Fix typo in RFC number, make writing of "RFC NNNN" consistent. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02llmnr-query: Make query type ANY the defaultSchimmelreiter1-2/+2
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02llmnr-query: Set TTL values as suggested in RFC 4795, section 2.5Tobias Klauser1-2/+27
Follow commit 64644dde ("socket: Set TTL values as suggested in RFC 4795, section 2.5") and set the TTL of the IP header to 255 for UDP unicast and multicast packets, as recommended in RFC 4795, section 2.5. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-08-02socket: Set TTL values as suggested in RFC 4795, section 2.5Tobias Klauser1-1/+24
Set the TTL of the IP header to 255 for UDP unicast and multicast packets, as recommended in RFC 4795, section 2.5. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-29iface: Close rtnl socket if address enumeration failsTobias Klauser1-2/+2
Fix a resource leak by closing the socket if iface_rtnl_enumerate() fails. Discovered by the Coverity scanner CID 99694. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-29iface: Fix memory leak in error caseTobias Klauser1-0/+3
If add from leaking in case the address was (unexpectedly) not found. This addresses CID 99695 discovered by the Coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-29iface: Use getnameinfo() to get address from struct sockaddr_storageTobias Klauser1-2/+5
Use getnameinfo() instead of inet_ntop() with weird (and incorrect) pointer arithmetics to get the numeric address from a struct sockaddr_storage. This addresses CID 99692 & 99696 discovered by the Coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-29llmnrd: Use SA_RESTART for installed signal handlersTobias Klauser1-0/+1
Make certain syscalls restartable after signal handler. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-29llmnrd: Add missing break in switchTobias Klauser1-0/+1
Discovered by the Coverity scanner CID 99693. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-28COPYING: Add verbatim copy of GPLv2Tobias Klauser1-0/+339
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-04-28build: travis: Set up Coverity scanTobias Klauser1-0/+14
Set up Travis CI integration for Coverity scan. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-01-26build: Fix install targets for use with DESTDIRTobias Klauser1-2/+2
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-07-28llmnr-query: Consistently name variables containing number of msecsTobias Klauser1-7/+7
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-07-01llmnr-query: Allow to specifiy query timeout on command lineTobias Klauser1-5/+10
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-04-08socket: Remove unused constantTobias Klauser1-1/+0
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-04-08util: Add attribute warn_unused_result to allocation functionsTobias Klauser2-4/+5
Add the warn_unused_result GCC function attribute to all allocation functions in xmalloc. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-20iface: Proper types for arguments to iface_rtnl_enumerate()Tobias Klauser1-1/+1
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-19llmnrd: Fix address family type in event callbackTobias Klauser2-2/+4
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-19llmnr-query: Inform about empty responsesTobias Klauser1-0/+5
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-19iface: Correctly compare addresses, otherwise they're never actually deletedTobias Klauser1-37/+69
This also fixes a double free() and other memory corruption errors on interface delete. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-19iface: Correct error messageTobias Klauser1-1/+1
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd: Add IPv6 supportTobias Klauser5-55/+121
Closes #5 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18socket: Add functions for multicast group join/leave and IPv6 socket creationTobias Klauser2-10/+89
Add functions missed in previous commit, 069060cad6d9 ("llmnrd: Join IP multicast group on each new interface"). Also add socket_open_ipv6() to creat IPv6 sockets. Not used yet. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd: Join IP multicast group on each new interfaceTobias Klauser5-27/+70
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnr-query: Add option to send query over different interfaceTobias Klauser1-11/+44
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd: Fix usageTobias Klauser1-5/+5
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18socket: Don't unnecessarily disable IP_MULTICAST_LOOPTobias Klauser1-6/+0
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd: Support daemonizationTobias Klauser1-1/+5
No logging to syslog or dropping of privileges etc yet. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18socket: Use inet_pton instead of inet_addrTobias Klauser1-1/+1
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18build: Check if called from git repo when generating GIT_VERSIONTobias Klauser3-5/+10
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd, llmnr-query: Add git id to version outputTobias Klauser3-5/+8
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnr-query: Support sending queries using IPv6Tobias Klauser1-13/+35
Partially resolves #5 (IPv6 support) Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17all: Add version informationTobias Klauser3-9/+37
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17llmnrd: Implement message compression for nameTobias Klauser1-7/+8
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17llmnr-query: Skip length byte when getting previous name in compressed name ↵Tobias Klauser1-1/+1
extraction Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17llmnrd: Rename main.c to llmnrd.cTobias Klauser2-2/+2
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17llmnr-query: Add simple LLMNR query programTobias Klauser4-12/+279
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17compiler: Protect against redefinition of offsetof()Tobias Klauser1-4/+6
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17main: Add options to usage messageTobias Klauser1-2/+9
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17Add .travis.ymlTobias Klauser1-0/+6
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17Add .gitignoreTobias Klauser1-0/+2
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17README: Add some more description and referencesTobias Klauser1-0/+16
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17README: Add author sectionTobias Klauser1-0/+5
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17README: Add section about cross-compilationTobias Klauser1-4/+18
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17build: Add and document install targetTobias Klauser2-4/+34
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17README: Add some basic informationTobias Klauser1-0/+14
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-17all: Remove unnecessary log messagesTobias Klauser2-45/+15
These could be used to DoS llmnrd, just silently discard invalid packets. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>