summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
AgeCommit message (Collapse)Author
2014-06-19sd-icmp6-nd: Add initial Router Advertisement test casePatrik Flykt
Feed a Router Advertisement to the code and expect proper events each time. The sending part is ignored, as all of it is static code in the real dhcp_network_icmp6_send_rs() function.
2014-06-19sd-icmp6-nd: Add Router Solicitation and Advertisement supportPatrik Flykt
Provide functions to bind the ICMPv6 socket to the approriate interface and set multicast sending and receiving according to RFC 3493, section 5.2. and RFC 3542, sections 3. and 3.3. Filter out all ICMPv6 messages except Router Advertisements for the socket in question according to RFC 3542, section 3.2. Send Router Solicitations to the all routers multicast group as described in RFC 4861, section 6. and act on the received Router Advertisments according to section 6.3.7. Implement a similar API for ICMPv6 handling as is done for DHCPv4 and DHCPv6.
2014-06-19sd-dhcp6-client: Add initial DHCPv6 client filesPatrik Flykt
Add initial structure definition and functions for setting index, MAC address, callback and event loop. Define protocol values and states.
2014-06-19dhcp-server: simplify dhcp server unref callLennart Poettering
No need to use HASHMAP_ITERATE when we destruct all entries anyway.
2014-06-18sd-dhcp-client: check return from dhcp_option_appendThomas Hindoe Paaboel Andersen
2014-06-18sd-dhcp-server: fix a leakThomas Hindoe Paaboel Andersen
We must use free instead of dhcp_lease_free here to avoid freeing client_id.data.
2014-06-18dhcp-network: remove TODOMichal Sekletar
There is no need to explicitly check version of L3 protocol in the ethernet header because we bind socket with .sll_protocol set to ETH_P_IP, thus we only receive IPv4 packets on the socket.
2014-06-17networkd: veth - fix memleakTom Gundersen
2014-06-17sd-dhcp: checksum - make endianess-neutralTom Gundersen
For efficiency, we group bytes together before adding them up. This is guaranteed to always work (regardless of the byte order) as long as the i-th byte in each group lign up with the i-th byte in each other group. On big-endian machines this broke when handling the trailing few bytes which did not make up a full group of 4 bytes. This patch fixes the problem by explicitly creating a 4 byte zero-padded group out of the trailing bytes. Reported and tested by Thomas Ritter <th.ritter@gmx.at>.
2014-06-13sd-dhcp-server: test - skip when lacking permsTom Gundersen
2014-06-13sd-dhcp-client: fix invalid free() in client_send_request()Andreas Henriksson
static int client_send_request(...) in ./src/libsystemd-network/sd-dhcp-client.c tries to initialize "request" by calling client_message_init(...), which has atleast 5 error cases where it can return without that happening. This leads to the function finishing without "request" being initialized.
2014-06-13sd-dhcp-server: add RELEASE supportTom Gundersen
2014-06-13sd-dhcp-server: add dummy DECLINE supportTom Gundersen
2014-06-13sd-dhcp-server: track bound leasesTom Gundersen
Make sure we don't hand out the same IP twice. We still don't handle lease expiry.
2014-06-13sd-dhcp-server: add support for clients requesting lease lifetimeTom Gundersen
2014-06-13sd-dhcp-server: add basic NAK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic REQUEST/ACK supportTom Gundersen
2014-06-13sd-dhcp-server: add basic DISCOVER/OFFER supportTom Gundersen
2014-06-13sd-dhcp-server: add support for sending messagesTom Gundersen
2014-06-13sd-dhcp-server: add support for setting the server addressTom Gundersen
2014-06-13sd-dhcp-server: bind to raw socket for sendingTom Gundersen
We would like to use the UDP socket, but we cannot as we need to specify the MAC address manually.
2014-06-13sd-dhcp-server: add basic message parsingTom Gundersen
Parse the maximum message size the client can accept and the client id, falling back to sane defaults if they are not set.
2014-06-13sd-dhcp-server: add basic message handling and verificationTom Gundersen
2014-06-13sd-dhcp-server: bind to a given interfaceTom Gundersen
We will (at least at first), restrict our focus to running the server on at most one interface.
2014-06-13sd-dhcp-server: add basic functionality for starting/stopping serverTom Gundersen
Bind to UDP socket and listen for messages, discarding anything we receive.
2014-06-13sd-dhcp-server: add basic functionality for creating/destroying server instanceTom Gundersen
2014-06-13dhcp-network: allow UDP socket to listen on any addressTom Gundersen
For this to work nicely we need to use REUSEADDR so that more than one socket can be open at the same time. Also, we request the ifindex to be appended to incoming messages, so we know whence it came.
2014-06-03sd-dhcp-client: allways request broadcastCamilo Aguilar
On systems which cannot receive unicast packets until its IP stack has been configured we need to request broadcast packets. We are currently not able to reliably detect when this is necessary, so set it unconditionally for now. This is set on all packets, but the DHCP server will only broadcast the packets that are necessary, and unicast the rest. For more information please refer to this thread in CoreOS: https://github.com/coreos/bugs/issues/12 [tomegun: rephrased commit message]
2014-06-03networkd: drop CAP_SYS_MODULETom Gundersen
Rely on modules being built-in or autoloaded on-demand. As networkd is a network facing service, we want to limits its capabilities, as much as possible. Also, we may not have CAP_SYS_MODULE in a container, and we want networkd to work the same there. Module autoloading does not always work, but should be fixed by the kernel patch f98f89a0104454f35a: 'net: tunnels - enable module autoloading', which is currently in net-next and which people may consider backporting if they want tunneling support without compiling in the modules. Early adopters may also use a module-load.d snippet and order systemd-modules-load.service before networkd to force the module loading of tunneling modules. This sholud fix the various build issues people have reported.
2014-05-26test-dhcp-option: fix memleakTom Gundersen
2014-05-25Use %m instead of strerror(errno) where appropiateCristian Rodríguez
2014-05-21sd-dhcp-client: factor out dhcp packet allocationTom Gundersen
2014-05-21sd-dhcp: rely on FIONREAD workingTom Gundersen
This fallback will anyway never get tested, so rip it out.
2014-05-21sd-dhcp: option_append - support falling back to 'sname' and 'file'Tom Gundersen
2014-05-21sd-dhcp: make sure we can not fill options so much that there is no space ↵Tom Gundersen
for END
2014-05-20dhcp-lease: add support for parsing a few more dhcp optionsTom Gundersen
2014-05-20dhcp-lease: refactor lease parsingTom Gundersen
Use helper functions, and add some more sanity checking/asserts.
2014-05-20sd-dhcp: refactor parse_optionsTom Gundersen
Similar to the previous patch, exchange a length and a pointer with only one offset variable. Also fix the type of the options to be uint8_t[], rather than uint8_t*.
2014-05-20sd-dhcp: refactor dhcp_option_appendTom Gundersen
Store a pointer to the options in the DHCPMessage struct, and pass this together with an offset around, rather than a uint8_t**. This avoids us having to (re)compute the pointer; and changes dhcp_option_append from adjusting both the pointer to the next option and the remaining size of the options, to just adjusting the current offset. This makes the code a bit simpler to follow IMHO, but there should be no functional change.
2014-05-19sd-dhcp-lease/sd-network: modernization and fix leakTom Gundersen
2014-05-19sd-dhcp-lease: move in_addr (de)serialization to shared network codeTom Gundersen
2014-05-12networkd: manager - don't leak kmod contextTom Gundersen
Also, keep the kmod_new internal to networkd-manager.c
2014-05-12networkd: introduce ipip tunnelSusant Sahani
This patch enables basic ipip tunnel support. It works with kernel module ipip example conf: file: ipip.netdev [NetDev] Name=ipip-tun Kind=ipip MTUBytes=1480 [Tunnel] Local=192.168.223.238 Remote=192.169.224.239 TTL=64 file: ipip.network [Match] Name=em1 [Network] Tunnel=ipip-tun [tomegun: - drop unused variable - take ref when enslaving]
2014-05-09sd-dhcp-client: improve logging when stopping clientTom Gundersen
'Requested by user' was confusing, just drop it.
2014-05-07sd-network: expose both admin and operational state directlyTom Gundersen
Also add a call to check if a link is loopback, as this should commonly be ignored.
2014-05-06sd-dhcp-client: use asynchronous_close()Tom Gundersen
close() is a blocking call, which may slow things down measurably when running many dhcp clients in the same single-threaded main loop. Let's just use the asynchronous version instead to avoid the problem.
2014-05-06sd-dhcp: network - don't leak sockets on failureTom Gundersen
Also some general cleanups
2014-05-06sd-dhcp: network - set TOS on outgoing packetsTom Gundersen
This should improve performance on busy wireless networks and the like. Inspired by a similar change in dnsmasq.
2014-05-06dhcp-network: don't pass ifindex to bind_udp_socketTom Gundersen
UDP sockets can anyway not be bound to specific netdev's. The packages would have to be filtered when received instead.
2014-04-30networkd: dont configure route if lease doesn't have oneUmut Tezduyar Lindskog