summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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>
2015-02-17llmnr: Report proper address type in response for qtype ANYTobias Klauser1-1/+4
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16llmnr: Remove some unnecessary log messagesTobias Klauser1-5/+0
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16llmnr: Fix response packet byte order and name sizeTobias Klauser1-5/+5
We need to return type, class, ttl and rdlength in network byte order. Also we need to pkt_put() 2 bytes in addition to the hostname length (length and NULL byte). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16llmnr: Unindent llmnr_respond()Tobias Klauser1-87/+89
Exit out early if the query class is not LLMNR_QCLASS_IN. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16pkt: Add pkt_reset()Tobias Klauser1-0/+7
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16pkt: Use macro to generate pkt_put_u{8,16,32}Tobias Klauser1-9/+8
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16plt: Fix packet length check in pkt_put()Tobias Klauser1-1/+1
pkt_len() return the amount of bytes the packet currently holds. Together with the newly added bytes it mustn't exceed p->size. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-16pkt: Initialize size member properlyTobias Klauser1-0/+1
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>