Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a command line option -i/--interface which allows to bind the llmnrd
sockets to a specific interface. If used, requests are only answered on
the specified interface.
Example: llmnrd -i eth0
Closes #9
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Currently IPv6 addresses are always enumerated via RTNL socket and then
stored internally, even if llmnrd was started without the IPv6 command
line option '-6'. Even though no queries on AF_INET6 sockets will be
answered, this behavior might be confusing. Especially due to messages
like:
Added IPv6 address fe80::f0eb:aaff:feb3:ae58 on interface tap0
being logged.
Explicitely disable IPv6 address enumeration on the RTNL socket to fix
this behavior.
Closes #8
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
When accessing the compressed name in a response, verify that the
pointer is within the packet size.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Use MAXHOSTNAMELEN defined in sys/param.h to determine the size of the
hostname buffer to allocate. Also make sure the string is properly
zero-terminated in all cases, as in some cases it might be undefined
whether a truncated string is properly terminated.
Note: Also remove a TODO comment, as watching for hostname changes at
runtime is outside the scope of llmnrd (also, avahi behaves the same).
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
There is no need to have such a short timeout value (200us), increase
it to 50ms in order to reduce CPU load.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
Fix typo in RFC number, make writing of "RFC NNNN" consistent.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Make certain syscalls restartable after signal handler.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Discovered by the Coverity scanner CID 99693.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Set up Travis CI integration for Coverity scan.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Add the warn_unused_result GCC function attribute to all allocation
functions in xmalloc.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
This also fixes a double free() and other memory corruption errors on
interface delete.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Closes #5
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
No logging to syslog or dropping of privileges etc yet.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Partially resolves #5 (IPv6 support)
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
extraction
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|