Commit graph

34 commits

Author SHA1 Message Date
Lennart Poettering 8e38570ebe tree-wide: htonl() is weird, let's use htobe32() instead (#3538)
Super-important change, yeah!
2016-06-15 01:26:01 +02:00
Susant Sahani 1d7100298c networkd: Tunnel add support to configure key for VTI/VTI6 (#3532)
fixes #3298
2016-06-14 19:11:57 +02:00
Susant Sahani 07dcb08589 networkd: tunnel fix tunnel address
this fixes 2655
2016-02-20 18:03:31 +05:30
Daniel Mack b26fa1a2fb tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
2016-02-10 13:41:57 +01:00
Susant Sahani efd3c89734 networkd: tunnel add support to configure address "any"
It enhances tunnel(IPIP,GRE, SIT) to aconfigure address as
any.

Fixes #2279
2016-01-15 09:32:58 +05:30
Lennart Poettering 8b43440b7e util-lib: move string table stuff into its own string-table.[ch] 2015-10-27 13:25:56 +01:00
Lennart Poettering 6bedfcbb29 util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 07630cea1f util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.
2015-10-24 23:05:02 +02:00
Lennart Poettering 12ca818ffd tree-wide: clean up log_syntax() usage
- Rely everywhere that we use abs() on the error code passed in anyway,
  thus don't need to explicitly negate what we pass in

- Never attach synthetic error number information to log messages. Only
  log about errors we *receive* with the error number we got there,
  don't log any synthetic error, that don#t even propagate, but just eat
  up.

- Be more careful with attaching exactly the error we get, instead of
  errno or unrelated errors randomly.

- Fix one occasion where the error number and line number got swapped.

- Make sure we never tape over OOM issues, or inability to resolve
  specifiers
2015-09-30 22:26:16 +02:00
Susant Sahani b48288868a networkd: add support for tunnel encap limit
The Tunnel Encapsulation Limit option specifies how many additional
levels of encapsulation are permitted to be prepended to the packet
2015-08-31 13:21:44 +05:30
Susant Sahani 6870b41563 networkd: fix size of networkd binary
This patch fixes the size of networkd
Bug #775

before:

size systemd-networkd
   text	   data	    bss	    dec	    hex	filename
1493755	8424392	   2337	9920484	 975fe4	systemd-networkd

After

$ size systemd-networkd
   text	   data	    bss	    dec	    hex	filename
1493555	  35752	   2337	1531644	 175efc	systemd-networkd
2015-07-29 22:20:06 +05:30
Zbigniew Jędrzejewski-Szmek a9b70f9dfd network: rename DiffServiceCodePoint to CopyDSCP
Old name was slightly misleading, because this flag does not determine
whether DSCP is used overall, but only if it is copied to the
decapsulated packet. Rename to better reflect that.

"Copy" does not imply direction. This is on purpose, because we might
later on enhance the setting to allow/disallow copying in the other
direction, to the encapsulated packet. If that is implemented,
CopyDSCP could understand additional values. This is nicer than
having two separate settings and follows the example of DHCP=.

Also, we try to avoid abbreviations, but we allow acronyms
like MTU, in DiscoverPathMTU=.

This setting was recently added, so it's fine to rename it without
backwards compat.
2015-07-24 23:44:34 -04:00
Susant Sahani 54a9d20c47 networkd: ip6gre add support for flowlabel 2015-07-23 15:45:38 +05:30
Susant Sahani ec2a3e3af2 networkd: ip6 tunnel add DSCP
This patch adds support for setting the
DSCP field in the ip6 tunnel.

when set it inherits DSCP field between inner and outer header.
2015-07-23 09:52:24 +05:30
Susant Sahani 407af9dd89 networkd: ip6 tunnel add support for flowlabel
Add Pv6 Flow Label support. The 20-bit Flow Label field in the IPv6
header[RFC2460] is used by a  node to label packets of a flow.
2015-07-21 10:06:44 +05:30
Tom Gundersen 1c4baffc18 sd-netlink: rename from sd-rtnl 2015-06-13 19:52:54 +02:00
Thomas Hindoe Paaboel Andersen 7185d80558 networkd: remove dead initialization 2015-05-13 23:44:20 +02:00
Susant Sahani 9011ce771f networkd: introduce vti6 tunnel
This patch add support to create vti6 tunnel

test:

vt6.network
[Match]
Name=wlan0

[Network]
Tunnel=ip6vti

vti6.netdev
[NetDev]
Name=ip6vti
Kind=vti6

[Tunnel]
Local=2a00:ffde:4567:edde::4987
Remote=2001:473:fece:cafe::5179

ip link

11: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default
    link/tunnel6 :: brd ::
12: ip6vti@wlan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN
mode DEFAULT group default
    link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
2015-04-29 21:54:00 +02:00
Susant Sahani 5289f3ff07 networkd: tunnel improve logging
Replaces a lof ot strerror() usage with log_netdev_error_errno()
2015-04-29 21:54:00 +02:00
Thomas Hindoe Paaboel Andersen 2eec67acbb remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
2015-02-23 23:53:42 +01:00
Tom Gundersen 73b23bea86 networkd: tunnel - call tunnel modes ipip6, not ip4ipv6 to match ip(8) 2015-01-28 21:35:54 +01:00
Susant Sahani b16492f86f networkd: Introduce ip6gre and ip6gretap
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🇩🇪45:67:ed🇩🇪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-22 21:29:42 +01:00
Susant Sahani 855ee1a1d2 networkd: Introduce IP6 tunnel
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-22 21:29:42 +01:00
Susant Sahani 1af2536acf networkd: introduce gretap
This patch introdeces gretap to networkd
2015-01-22 21:29:41 +01:00
Tom Gundersen 7bdb04298f networkd: tunnel - allow INADDR_ANY as the local address 2014-12-04 16:02:05 +01:00
Lennart Poettering 79008bddf6 log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most
  other log functions that are usually invoked through macros, but never
  directly.

- Rename log_info_object() to log_object_info(), simply because the
  object should be before any other parameters, to follow OO-style
  programming style.
2014-11-27 22:05:24 +01:00
Susant Sahani 9243e967a3 networkd: add Patch of MTU discovery for IPIP and GRE
Add path of MTU disovery for IPIP and GRE Kind of tunnels
2014-10-29 10:54:01 +05:30
Susant Sahani 436b910f1f networkd: add back path of MTU discovery for SIT 2014-10-29 10:53:56 +05:30
Tom Gundersen 0b1831c20c networkd: split out networkd-link.h 2014-08-12 20:42:59 +02:00
Lennart Poettering 6436165dbc sd-network: rename the per-ifindex calls to sd_network_get_link_xxx()
This way we can introduce system-wide versions of these calls that are
called the same way, but without the "link" in the name.
2014-08-11 22:56:52 +02:00
Lennart Poettering 44e7b94926 networkd: monopolize in_addr utility functions in shared/in-addr-util.h
Primarily, this means we get rid of net_parse_inaddr(), and replace it
everywhere with in_addr_from_string() and in_addr_from_string_auto().
These functions do not clobber the callers arguments on failure, which
is more close to our usual coding style.
2014-08-11 22:46:42 +02:00
Tom Gundersen aa9f114058 networkd: netdev - split NetDev struct into per-kind structs
Similarly to how unit types work.
2014-07-21 13:32:27 +02:00
Zbigniew Jędrzejewski-Szmek 6eb33ab207 networkd: fix colud typo
sztanpet> if your already there, might fixing "Colud" to Could in 53af3b7
2014-07-17 08:14:15 -04:00
Tom Gundersen 3be1d7e0c5 networkd: netdev - introduce vtable for netdev kinds
Split each netdev kind into its own .h/.c.
2014-07-14 16:49:41 +02:00
Renamed from src/network/networkd-tunnel.c (Browse further)