Age | Commit message (Collapse) | Author | Files | Lines |
|
The -i option requires running llmnrd as root for SO_BINDTODEVICE to
work. Packets are still filtered based on interface because only rtnl
messages for addresses of the specified interface are considered in
iface_nlmsg_change_addr. Instead log a warning only if SO_BINDTODEVICE
fails.
Signed-off-by: Jon Franklin <jvfranklin@gmail.com>
[tk: small adjustments to commit message, check return value of iface_init]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
If an interface is configured with multiple addresses, llmnrd tries to
join the LLMNR multicast group for each address instead of once per
interface. Ideally llmnrd should track whether the group is already
joined but since the kernel tells us that the group is already joined,
just omit the error message on EADDRINUSE.
This fixes the following error case:
$ ip address add 2001:db8:1::/48 dev eth0
$ ./llmnrd -6
Starting llmnrd on port 5355, hostname foobar
Added IPv4 address 127.0.0.1 on interface lo
Added IPv4 address 10.42.0.42 on interface eth0
Added IPv6 address ::1 on interface lo
Added IPv6 address 2001:db8:1:: on interface eth1
Error: Failed to join IPv6 multicast group on interface eth1: Address already in use
Added IPv6 address fe80::xxxx:xxxx:xxxx:xxxx on interface eth0
Reference: #21
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
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>
|
|
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>
|
|
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>
|
|
|