summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.c
AgeCommit message (Collapse)Author
2015-01-22networkd: Introduce ip6gre and ip6gretapSusant Sahani
This patch introduces ipv6 gre and gretap. test: ip6gre.netdev: [NetDev] Name=ip6gretap Kind=ip6gretap [Tunnel] Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ip6gre.network: [Match] Name=eno16777736 [Network] Tunnel=ip6gretap ip link 6: ip6gre@eno16777736: <POINTOPOINT,NOARP> mtu 1448 qdisc noop state DOWN mode DEFAULT group default link/gre6 2a:00:ff:de:45:67:ed:de:00:00:00:00:00:00:49:87 peer 20:01:04:73:fe:ce:ca:fe:00:00:00:00:00:00:51:79
2015-01-22networkd: Introduce IP6 tunnelSusant Sahani
This patch enables networkd to create IP6 tunnels example conf: ipip6.netdev: [NetDev] Name=ipip6-tunnel Kind=ip6tnl [Tunnel] Mode=ip4ipv6 Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ipip6.network [Match] Name=wlan0 [Network] Tunnel=ipip6-tunnel 23: ipip6-tunnel@wlan0: <POINTOPOINT,NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
2015-01-22networkd: introduce gretapSusant Sahani
This patch introdeces gretap to networkd
2015-01-19networkd: netdev - add ipvlan supportTom Gundersen
2015-01-13networkd: make IP forwarding for IPv4 and IPv6 individually configurableLennart Poettering
2015-01-13networkd: introduce an AddressFamilyBoolean enum typeLennart Poettering
This introduces am AddressFamilyBoolean type that works more or less like a booleaan, but can optionally turn on/off things for ipv4 and ipv6 independently. THis also ports the DHCP field over to it.
2015-01-13networkd: add minimal IP forwarding and masquerading support to .network filesLennart Poettering
This adds two new settings to networkd's .network files: IPForwarding=yes and IPMasquerade=yes. The former controls the "forwarding" sysctl setting of the interface, thus controlling whether IP forwarding shall be enabled on the specific interface. The latter controls whether a firewall rule shall be installed that exposes traffic coming from the interface as coming from the local host to all other interfaces. This also enables both options by default for container network interfaces, thus making "systemd-nspawn --network-veth" have network connectivity out of the box.
2014-12-18networkd: add FDB supportAlin Rauta
2014-12-10networkd: rename section [BridgePort] → [Bridge]Lennart Poettering
Let's stick to generic sections that describe the general technology, instead of specific per-object sections, unless we really have a reason to do that otherwise.
2014-12-08udev: link-config - simplify net-matchTom Gundersen
2014-12-08Check return value from reading name_assign_type attrDave Reisner
This file won't exist on kernels earlier than 3.17.
2014-12-05net_setup/networkd: warn if matching is done on possibly unstable ifnameTom Gundersen
2014-12-05networkd: add basic [Link] settings to .network filesTom Gundersen
This allows the default link settings (set in .link files) to be overridden per Network. Only MTU and MACAddress is supported for now.
2014-12-04udev: net_setup - allow matching on OriginalName=Tom Gundersen
This has been requested repeatedly, so let's give it a go. We explicitly do not allow matching on names that have already been changed (from a previous udev run, or otherwise), and matching on unpredictable names (ethX) is discouraged (but not currently disallowed). We also currently allow: [Match] Name=veth0 [Link] Name=my-name0 SomeOtherSetting=true Which means that the link file will be applied the first time it is invoked, but not on subsequent invocations, which may be surprising.
2014-12-04networkd: Add bridge port path costSusant Sahani
This patch add support to specify path cost of the bridge port to be configured via conf file. Exampe: conf file: br.netdev [NetDev] Name=br-test Kind=bridge file: br.network [Match] Name=em1 [Network] Bridge=br-test [BridgePort] Cost=332 bridge link 2: em1 state UP : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-test state disabled priority 32 cost 332
2014-11-28treewide: yet more log_*_errno + return simplificationsMichal Schmidt
Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-09-15hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
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-08-19networkd: fix use-after-freeTom Gundersen
Elements must be removed from the hashtable before they are freed.
2014-08-15networkd: print nice warnings if people configure invalid domain namesLennart Poettering
2014-08-15networkd: fix minor memory leakLennart Poettering
2014-08-15networkd: remove "*" from domains listLennart Poettering
Also, simplify things a bit and make sure we don't forget looking at one of the entries.
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: don't respect domainname from DHCP by defaultTom Gundersen
Most routers will send garbage, so make this opt-in only.
2014-08-12networkd: disable ipv4ll default routes by defaultTom Gundersen
This causes machines without connectivity to hang where they would otherwise fail. Keep it opt-in for now, but consider whether we sholud just drop it.
2014-08-12networkd: split out networkd-link.hTom Gundersen
2014-08-04networkd: add and expose per-link LLMNR config optionTom Gundersen
2014-07-28networkd: route/address - use trivial hash functionsTom Gundersen
2014-07-28networkd: unify handling of stacked netdevsTom 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-21networkd: netdev - split NetDev struct into per-kind structsTom Gundersen
Similarly to how unit types work.
2014-07-16Be more careful when checking for empty filesZbigniew Jędrzejewski-Szmek
If we want to avoid reading a totally empty file, it seems better to check after we have opened the file, not before.
2014-07-16Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek
Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
2014-07-15Constify ConfigTableItem tablesZbigniew Jędrzejewski-Szmek
2014-07-14networkd: netdev - introduce vtable for netdev kindsTom Gundersen
Split each netdev kind into its own .h/.c.
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-04networkd: accept section DHCP in systemd.network filesSteven Noonan
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-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-16networkd: unref tunnelSusant Sahani
Unref tunnel while shutting down
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-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-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-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.
2014-05-16networkd: network - store DNS servers in List rather than SetTom Gundersen
This way we preserve the order of preference.