summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
AgeCommit message (Collapse)Author
2014-09-13networkd: remove vestigial event sourcesDave Reisner
187fe1db took advantage of floating events, but didn't remove pointers it made superfluous.
2014-09-08networkd: allow specification of DHCP route metricAngus Gibson
This lets the routing metric for links to be specified per-network, still defaulting to DHCP_ROUTE_METRIC (1024) if unspecified. Hopefully this helps with multiple interfaces configured via DHCP.
2014-09-08networkd: add preferred source to dhcp4 gateway routeEmil Renner Berthing
This makes DHCPv4 and IPv4LL coexist peacefully. [tomegun: apply to both the dhcp routes, use in_addr_is_null() rather than a separate variable to indicate when prefsrc should be applied]
2014-08-19networkd: don't consider deprecated or tentative addresses when determining ↵Tom Gundersen
operstate https://bugs.freedesktop.org/show_bug.cgi?id=81287
2014-08-15sd-network: add support for wildcard domainsTom Gundersen
2014-08-15networkd: add support for Domains= to .network filesTom Gundersen
This allows the search/routing domanis to be specified per link/network and be passed on to resolved.
2014-08-15networkd: rename UseDomainName to UseDomainsTom Gundersen
This option will also apply to the search domains, so make it plural.
2014-08-12networkd: split out networkd-link.hTom Gundersen
2014-08-04networkd: add and expose per-link LLMNR config optionTom Gundersen
2014-08-01networkd: track the MTU of each linkTom Gundersen
And inform the DHCPv4 clients about it.
2014-07-28networkd: route/address - use trivial hash functionsTom Gundersen
2014-07-28networkd: unify handling of stacked netdevsTom Gundersen
2014-07-28networkd: store ifindex as intTom Gundersen
2014-07-25networkd: ipv4ll - default to setting up ipv4ll routesTom Gundersen
This is necessary for non-ipv4ll hosts to communicate with ipv4ll-only hosts on the same link. Defaults to being enabled, but can be opted out. See: <http://avahi.org/wiki/AvahiAutoipd#Routes>
2014-07-23networkd: merge DNS and NTP entries when exportingTom Gundersen
In the state files, do not distinguish where the various entries came from (static or DHCP), but include them all in the same list.
2014-07-23networkd: set route protocolDan Williams
All routes added by networkd are currently set RTPROT_BOOT, which according to the kernel means "Route installed during boot" (rtnetlink.h). But this is not always the case as networkd changes routing after boot too. Since the kernel gives more detailed protocols, use them. With this patch, user-configured static routes now use RTPROT_STATIC (which they are) and DHCP routes use RTPROT_DHCP. There is no define for IPv4LL yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is better?). [tomegun: fixup src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
2014-07-18change type for address family to "int"Lennart Poettering
Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
2014-07-15sd-dhcp-client: make request broadcasts opt-inTom Gundersen
It appears there is no good way to decide whether or not broadcasts should be enabled, there is hardware that must have broadcast, and there are networks that only allow unicast. So we give up and make this configurable. By default, unicast is used, but if the kernel were to inform us abotu certain interfaces requiring broadcast, we could change this to opt-in by default in those cases.
2014-07-14networkd: netdev - introduce vtable for netdev kindsTom Gundersen
Split each netdev kind into its own .h/.c.
2014-07-14networkd: netdev - split out bridge creationTom Gundersen
2014-07-14networkd: netdev - rename 'enslave' to 'join'Tom Gundersen
Enslave only really makes sense when referring to bridges and bonds, so try to be a bit more neutral.
2014-07-14networkd: dhcp add vendor class indentifier option 60Susant Sahani
Vendor Class Identifier be used by DHCP clients to identify their vendor type and configuration. When using this option, vendors can define their own specific identifier values, such as to convey a particular hardware or operating system configuration or other identifying information. Vendor-specified DHCP options—features that let administrators assign separate options to clients with similar configuration requirements. For example, if DHCP-aware clients for example we want to separate different gateway and option for different set of people (dev/test/hr/finance) in a org or devices for example web/database servers or let's say in a embedded device etc and require a different default gateway or DNS server than the rest of clients.
2014-07-14networkd: make metric of routes configurableSusant Sahani
Now route metric can be configuted via conf file: example conf: [Match] Name=em1 [Route] Gateway=192.168.1.12 Metric=10 Test: ip route output default via 192.168.1.12 dev em1 metric 10 [tomegun: squash TODO update and reword man page a bit]
2014-07-10networkd: always prefer dhcp routes over ipv4ll routesLennart Poettering
2014-07-10shared: split out in_addr related calls from socket-util.[ch] into its ↵Lennart Poettering
private in-addr-util.[ch] These are enough calls for a new file, and they are sufficiently different from the sockaddr-related calls, hence let's split this out.
2014-07-07networkd: add support for modeSusant Sahani
This patch adds supports networkd to configure bond mode during creation via persistent conf. Mode can be configured with conf param 'Mode'. A new section Bond is added to the conf to support bond mode. These modes can be configured now. balance-rr active-backup balance-xor broadcast 802.3ad balance-tlb balance-alb Example conf file: test-bond.conf [NetDev] Name=bond1 Kind=bond [Bond] Mode=balance-xor Test case: 1. start networkd service: 12: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 22:89:6c:47:23:d2 brd ff:ff:ff:ff:ff:ff 2. find bond mode: cat /proc/net/bonding/bond1 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (xor) Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Changes: 1. Added file networkd-bond.c 2. Bond mode enum BondMode 3. conf section [Bond] [tomegun: whitespace]
2014-07-07networkd: add support for peer addressSusant Sahani
This patch adds peer address support for networkd . In the [Address] a new configurable param is Peer. [Match] Name=ipip-tun [Address] Address=10.0.0.1/32 Peer=10.0.0.2/32
2014-07-03networkd: tunnels - make tunnel address parsing genericTom Gundersen
It had a bug in the typing, fix that and also make it save the address family so we can print proper error messages.
2014-07-03networkd: Introduce tun/tap deviceSusant Sahani
This patch introduces TUN/TAP device creation support to networkd. Example conf to create a tap device: file: tap.netdev ------------------ [NetDev] Name=tap-test Kind=tap [Tap] OneQueue=true MultiQueue=true PacketInfo=true User=sus Group=sus ------------------ Test: 1. output of ip link tap-test: tap pi one_queue UNKNOWN_FLAGS:900 user 1000 group 1000 id: uid=1000(sus) gid=10(wheel) groups=10(wheel),1000(sus) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Modifications: Added: 1. file networkd-tuntap.c 3. netdev kind NETDEV_KIND_TUN and NETDEV_KIND_TAP 2. Tun and Tap Sections and config params to parse conf and gperf conf parameters [tomegun: tweak the 'kind' checking for received ifindex]
2014-07-03networkd: split out vlan and macvlan handlingTom Gundersen
2014-07-01networkd: netdev - add dummy supportTom Gundersen
2014-07-01networkd: send hostname to dhcp serverEugene Yakubovich
Send hostname (option 12) in DISCOVER and REQUEST messages so the DHCP server could use it to register with dynamic DNS and such. To opt-out of this behaviour set SendHostname to false in [DHCP] section of .network file [tomegun: rebased, made sure a failing set_hostname is a noop and moved config from DHCPv4 to DHCP]
2014-07-01networkd: tunnel - ensure that enslave callback is always invokedTom Gundersen
The Link statemachine relies on this, as it would otherwise wait forever. Hook up the tunnels in the same way as the other NetDev's.
2014-06-29Add support for DHCP static route optionsEugene Yakubovich
This adds support for DHCP options 33 and 121: Static Route and Classless Static Route. To enable this feature, set UseRoutes=true in .network file. Returned routes are added to the routing table.
2014-06-29networkd: merge DHCPv4 and DHCPv6 configTom Gundersen
If there are v4 or v6 specific options we can keep those in separate sections, but for the common options, we will use only one. Moreovere only use DHCP=[yes/both|no/none|v4|v6] to enable or disable the clients.
2014-06-19networkd: Add initial DHCPv6 supportPatrik Flykt
Enable DHCPv6 support by creating a DHCPv6 boolean in the Network section. Add necessary DHCPv6 structures and initial function calls.
2014-06-18networkd: add address pool supportLennart Poettering
When an address is configured to be all zeroes, networkd will now automatically find a locally unused network of the right size from a list of pre-configured pools. Currently those pools are 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and fc00::/7, i.e. the network ranges for private networks. They are compiled in, but should be configurable eventually. This allows applying the same configuration to a large number of interfaces with each time a different IP range block, and management of these IP ranges is fully automatic. When allocating an address range from the pool it is made sure the range is not used otherwise.
2014-06-18socket-util: introduce in_addr_union similar to sockaddr_union and make use ↵Lennart Poettering
of it everywhere
2014-06-16networkd: introduce vxlanSusant Sahani
This patch enables netwokd to create vxlan Changes: Added: 1. File networkd networkd-vxlan.c 2. to netdev bool learning struct in_addr group uint64_t vxlanid; 3. VXLAN subsection and config parameters
2014-06-16networkd: rename netdev variablesSusant Sahani
Rename the netdev variables. Remove tunnel_ so that it can be reused .
2014-06-14networkd: netdev - allow setting MACAddress in .netdev filesTom Gundersen
It may sometimes be necessary to specify the MAC address of a netdev. Let us set the correct one from the get-go, rather than having the kernel generate a random one, and then change it after.
2014-06-13networkd: link - left-align debug messagesTom Gundersen
Still add some whitespace betwen ifname and the message to get the messages aligned (as I find it easier to spot specific messages this way).
2014-06-13networkd: add dhcp server supportTom Gundersen
When enabled in [Network] it will set up a dhcp server on the interface, listening on one of its statically configured IPv4 addresses and with a fixed size pool of leases determined from it. Example: [Match] Name=ve-arch-tree [Network] Address=192.168.12.5/24 DHCPServer=yes [Route] Gateway=192.168.12.5 Destination=192.168.12.0/24 In this case we will configure ve-arch-tree with the address 192.168.12.5 and hand out addresses in the range 192.168.12.6 - 192.168.12.38. In the future, we should (as suggested by Lennart) introduce a syntax to pick the server address automatically.
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-06-02networkd: introduce vti tunnelSusant Sahani
This patch enables vti tunnel support. example conf: file : vti.netdev [NetDev] Name=vti-tun Kind=vti MTUBytes=1480 [Tunnel] Local=X.X.X.X Remote=X.X.X.X file: vti.network [Match] Name=em1 [Network] Tunnel=vti-tun TODO: Add more attributes for vti tunnel IFLA_VTI_IKEY IFLA_VTI_OKEY
2014-06-02networkd: sit-tunnel add support for pmtudiscSusant Sahani
This patch adds path of mtu discovery for sit tunnel. To enable/disable DiscoverPathMTU is introduced. Example configuration file: sit.netdev [NetDev] Name=sit-tun Kind=sit MTUBytes=1480 [Tunnel] DiscoverPathMTU=1 Local=X.X.X.X Remote=X.X.X.X By default pmtudisc is turned on , if DiscoverPathMTU is missing from the config. To turn it off DiscoverPathMTU=0 needs to be set.
2014-06-02networkd: introduce veth device supportSusant Sahani
This patch adds veth device support to networkd. Example conf: File: veth.netdev [NetDev] Name=veth-test Kind=veth [Peer] Name=veth-peer
2014-05-19networkd/sd-network: extend operational statesTom Gundersen
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
2014-05-19networkd/sd-network: expose statically configured NTP serversTom Gundersen
2014-05-19resolved: add daemon to manage resolv.confTom Gundersen
Also remove the equivalent functionality from networkd.