summaryrefslogtreecommitdiff
path: root/socket.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-17llmnrd: Allow to bind to a specific network interfaceTobias Klauser1-2/+25
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>
2016-08-16llmnrd: Don't enumerate and store IPv6 addresses if IPv6 is disabledTobias Klauser1-3/+5
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>
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>
2015-04-08socket: Remove unused constantTobias Klauser1-1/+0
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18llmnrd: Add IPv6 supportTobias Klauser1-8/+15
Closes #5 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-18socket: Add functions for multicast group join/leave and IPv6 socket creationTobias Klauser1-9/+83
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-18socket: Don't unnecessarily disable IP_MULTICAST_LOOPTobias Klauser1-6/+0
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-16all: Remove trailing whitespacesTobias Klauser1-1/+1
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-02-06Initial import, still work in progressTobias Klauser1-0/+119