b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
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. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
933f9caeeb2b3c1b951d330e04beb04226e5a890 |
|
16-Nov-2015 |
Daniel Mack <daniel@zonque.org> |
siphash24: let siphash24_finalize() and siphash24() return the result directly
Rather than passing a pointer to return the result, return it directly
from the function calls.
Also, return the result in native endianess, and let the callers care
about the conversion. For hash tables and bloom filters, we don't care,
but in order to keep MAC addresses and DHCP client IDs stable, we
explicitly convert to LE. |
dbe81cbd2a93088236a2e4e41eeb33378940f7b9 |
|
16-Nov-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
siphash24: change result argument to uint64_t
Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which
enforce pointer alignment this fixes crashes when we previously cast an
unaligned array to uint64_t*, and on others this should at least improve
performance as the compiler now aligns these properly.
This also simplifies the code in most cases by getting rid of typecasts. The
only place which we can't change is struct duid's en.id, as that is _packed_
and public API, so we can't enforce alignment of the "id" field and have to
use memcpy instead. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
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. |
540eb5f03780b7df6bb013622fb112468f94951c |
|
05-Oct-2015 |
Susant Sahani <ssahani@gmail.com> |
networkd: add bridge properties
ForwardDelaySec: forward delay
HelloTimeSec: hello time
MaxAgeSec: maximum message age
for more information see
http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html
In kernel
br_dev_newlink: does not have the this functionality to set while
creation.
br_changelink: after creation we can change the parameters.
we need to first create then set it the parameters.
Introduce new callback post_create .This should
set the properties after the creation. |
fc2f9534d07db2b185c02b1961428b53daf1986e |
|
27-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
networkd: split up networkd.h into per-object header files
No functional changes, just moving definitions into separate header
files. |
f33ff02b1aca5272ec678d3f4a211b4337882348 |
|
27-Jul-2015 |
Susant Sahani <ssahani@gmail.com> |
networkd: add support for macvtap
This patch add support for macvtap.
see http://virt.kernelnewbies.org/MacVTap |
62e2d5bbabf0e6a5a262e9e1bed184552d98b0d9 |
|
29-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - avoid hanging transactions in failure cases
If a link is attempted t obe enslaved by a netdev that has already failed, we
must fail immediately and not save the callback for later, as it will then
never get triggered. |
b024a9cfb1bee0aa8e143f46db11a4c2a58fb798 |
|
29-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: fix segfault when cancelling callbacks
This only happens when something has gone wrong, so is not easy to hit. However,
if a bridge (say) is configured on a system without bridge support we will hit
this.
Fixes issue #299. |
1c4baffc1895809bae9ac36b670af90a4cb9cd7d |
|
13-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
sd-netlink: rename from sd-rtnl |
9011ce771f149ba45e8ffdb2ae4f0950cdbc6b8b |
|
29-Apr-2015 |
Susant Sahani <susant@redhat.com> |
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 |
6a7a4e4d0a057febab787a2d5d3e0b52d2db2268 |
|
21-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
networkd: improve how networkd logs things
This makes adds a couple of fixes:
- Introduces log_netdev_error_errno() and friends, which takes an error
number, and matches what log_link_error_errno() and friends do.
- Replaces a lof ot strerror() usage with log_netdev_error_errno(),
log_link_error_errno() and log_erro_errno()
- Uppercases the first character of many log messages, after all this is
supposed to be english language
- Drops manual negating of error codes before passing them to log
functions, the log functions all do that internally anyway.
Some other minor fixes.
Behaviour should not change really. |
98b32556701f2cc80495488b5d724577637540f6 |
|
21-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
networkd: fix confusion between log_netdev_error() but log_warning_netdev()
We should always name the object first, the level second, like
everywhere else in the sources. |
ff88a301e93cf1bddbaa7faa981f390a2a81a4bb |
|
04-Mar-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - inform when we take over an existing netdev
The crucial point here is that we will not change the settings of a netdev created by someone else
we simply use it as is and trust it was set up as intended.
This is confusing in the case of the pre-created netdev's (bond0 etc.), the solution should probably
be to simply make the kernel stop creating these devices as they are pretty useless. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
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. |
b16492f86f13abd4a9447afd0910139af9656906 |
|
22-Jan-2015 |
Susant Sahani <susant@redhat.com> |
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: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 |
855ee1a1d272b599410212b40768a9c71f260e37 |
|
22-Jan-2015 |
Susant Sahani <susant@redhat.com> |
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 |
1af2536acf8aecc3eb940d04268a419c956ee10a |
|
22-Jan-2015 |
Susant Sahani <susant@redhat.com> |
networkd: introduce gretap
This patch introdeces gretap to networkd |
c4a5ddc9f29cf910fac9d814cd898b4cc2bd79b1 |
|
19-Jan-2015 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - add ipvlan support |
d076c6f9e486587d634d59082d2a13b9cbb4aef3 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
networkd/resolved: correct spacing near eol in code comments |
32bc8adcd836baff68e4d0f53b9a382f358cccf8 |
|
05-Dec-2014 |
Tom Gundersen <teg@jklm.no> |
net_setup/networkd: warn if matching is done on possibly unstable ifname |
7eb08da4b388b920c8a894b1500c9cc7dc1f31ef |
|
04-Dec-2014 |
Tom Gundersen <teg@jklm.no> |
udev: net_setup - allow matching on OriginalName=
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. |
144232a8e0ea77eed8c5a456832758681b5b3511 |
|
03-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
networkd: fix typo
V2: found another one |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
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. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
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(). |
79008bddf679a5e0900369950eb346c9fa687107 |
|
27-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
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. |
086891e5c119abb9854237fc32e736fe2d67234c |
|
27-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers
This change has two benefits:
- The format string %m will now resolve to the specified error (or to
errno if the specified error is 0. This allows getting rid of a ton of
strerror() invocations, a function that is not thread-safe.
- The specified error can be passed to the journal in the ERRNO= field.
Now of course, we just need somebody to convert all cases of this:
log_error("Something happened: %s", strerror(-r));
into thus:
log_error_errno(-r, "Something happened: %m"); |
1eb808756e3e4cc724ba17725a8513e562551c21 |
|
08-Sep-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - failing to create a netdev is not fatal, just fail that netdev |
6c3e68e7c1adc6176526e69769bf2eba86cdd257 |
|
19-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - add missing callback when adding stacked devices
As the comment says, the passed in callback must always be invoked, or the underlying link
will hang. This was missed when reworking the code, so add it back in. |
0b1831c20c4d30077b6560b2b7d88bdb220d5cef |
|
12-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: split out networkd-link.h |
aa9f11405829fd4755fef28602a7167dba3ddc89 |
|
21-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - split NetDev struct into per-kind structs
Similarly to how unit types work. |
ca4e095ab9e970cb8fa472ae69ea1f0648041722 |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-rtnl: make string returned by sd_rtnl_message_read_string() const |
e46eab86cd119b04ac14f5a2b404a614ae350016 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
tty-ask-password-agent: modernization |
ed88bcfb7c15029f9fc95ee2380759a9eb782d46 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Be more careful when checking for empty files
If we want to avoid reading a totally empty file, it seems better
to check after we have opened the file, not before. |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
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. |
e9f3d2d508bfd9fb5b54e82994bda365a71eb864 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify ConfigTableItem tables |
3be1d7e0c5bf60658d34eb6311d4e77c6803578c |
|
14-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - introduce vtable for netdev kinds
Split each netdev kind into its own .h/.c. |
2023dc8a9a7d59eab16e020bbcd38b9e377ea452 |
|
14-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - rework load_one
We now:
- parse config
- match on environment
- verify and complement config
- create netdev |
6235b3def8f58afe5777f1f5b4e7951f9396c32c |
|
14-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - split out bridge creation |
3f2650377631aed3bc26fdbc3a2eef6e33cdf7e7 |
|
14-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - rename 'enslave' to 'join'
Enslave only really makes sense when referring to bridges and bonds, so try to be
a bit more neutral. |
fe8ac65b683ec7408b26ba40040134e6d66b1c5c |
|
07-Jul-2014 |
Susant Sahani <susant@redhat.com> |
networkd: add support for mode
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] |
ffd488e272aa95f7d43626e1f90fea8c30a5863b |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tuntap - default to no packet information
Susant says:
> ip tuntap turns this off by default.
Let's follow ip(8) here as that should be the least surprising. |
63dadd9075abd913ba6bf87e5933beb8eb8eeefb |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tuntap - enable PacketInfo by default |
6ef892fc05791a6609489df7b5d1b081819c5de9 |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - move tunnel address parsing to networkd-tunnel.c |
4826dd6850478ddec604787756db26c1ab2c106f |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tunnels - make tunnel address parsing generic
It had a bug in the typing, fix that and also make it save the address family so we
can print proper error messages. |
30ae9dfda3788cdfaf1b84d124dbc7feb638c77b |
|
03-Jul-2014 |
Susant Sahani <susant@redhat.com> |
networkd: Introduce tun/tap device
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] |
ad0774e61e436d052f93549fc7fd367ade069286 |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - drop the link callbacks after calling them once
We should never call them again, so make sure they are cleaned up correctly. |
563c69c6b2c2bd691352ef522cb9ec95c08a0c63 |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - take ref immediately after calling out
Keeping the refcounting next to the sd_bus_call_async() makes it easier to check. |
0372cb2bd2342fa5c5585c666f79159a8341f4a6 |
|
03-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: split out vlan and macvlan handling |
9e358851b470a1994287c8cb1d9eb78837faaf60 |
|
01-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - add dummy support |
8900367cd26c148200b4788cd9ae05995ceeb74c |
|
01-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - take ref when creating netdevs
We were doing this correctly for when the callback takes the Link object, but
must also do it for the cases it takes the NetDev object. |
d5b3d845f013f7f332c76e83bb8e867de7d3caee |
|
01-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tunnel - ensure that enslave callback is always invoked
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. |
8469c1d329f983992805b6e6b44ff40e34adfc45 |
|
01-Jul-2014 |
Susant Sahani <susant@redhat.com> |
networkd: netdev add one separate line |
6278a2019055ba63bfa80c2b107e16616ca648b1 |
|
20-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: veth - fix creation of veth netdev
Avoid freeing the netdev structure in the cleanup macro. |
5a1045a55689232443d86783b1423a2b4bdf1683 |
|
17-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: veth - fix parsing verification |
ee6b50892ea1fec81e10372c1c7c7606f5b2a25d |
|
17-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: vxlan - fix parsing verification |
5a3f198964dbc6fcf9157f1673689698ae89a3bf |
|
17-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: veth - fix memleak |
326cb4061a7d6ec4107f298b6f947d645512ad76 |
|
16-Jun-2014 |
Susant Sahani <susant@redhat.com> |
networkd: introduce vxlan
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 |
5c8f858d207992469bd65356e3e44d37fcefa4b0 |
|
14-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
Revert "Revert "networkd: netdev - set predictable mac address when creating netdev""
This reverts (and rewrites) commit 7d95c772cba1836545459760273b13f2e01dd2a8.
The issue blocking this feature has now been fixed in the kernel, and backported
to the various stable kernels.
Our netdevs will now have stable MAC addresses, even if one is not specified. |
96c907429e3224289fd360b8d9c8fdc573f4363b |
|
14-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - allow setting MACAddress in .netdev files
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. |
a613382bbf4357ce13f17c988713b80172e091fb |
|
02-Jun-2014 |
Susant Sahani <susant@redhat.com> |
networkd: introduce vti tunnel
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 |
a9f434cf00d1d36d9a013b9739efe69653dd7279 |
|
02-Jun-2014 |
Susant Sahani <susant@redhat.com> |
networkd: sit-tunnel add support for pmtudisc
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. |
4d7ec9fc36780ecad244d0cc35db737fffe95b8b |
|
02-Jun-2014 |
Susant Sahani <susant@redhat.com> |
networkd-netdev: fix white space |
10142d75cce10a92889cc11b7b1af07fecc78c5d |
|
02-Jun-2014 |
Susant Sahani <susant@redhat.com> |
networkd: introduce veth device support
This patch adds veth device support to networkd.
Example conf:
File: veth.netdev
[NetDev]
Name=veth-test
Kind=veth
[Peer]
Name=veth-peer |
3d94b7870c991701a439bb7862624c813bc9aeed |
|
16-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: fix typo |
987efa17dd5c9be156d8f49ddd942df20a72dcb1 |
|
15-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: logging - align messages |
5261692fe5a4ac82f9783d57a07b0a4786dc01ab |
|
15-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: log ifindices when links and netdevs are added |
af4e9e2c563047d524b207e0e3d6816385693a16 |
|
15-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: rename NetDev variable for consistency with Link |
7951dea20911969287878e6897b3eca348721ade |
|
12-May-2014 |
Susant Sahani <susant@redhat.com> |
networkd: introduce ipip tunnel
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] |
5e273efec5fcf60ddb55e6bc0aaa850cb1be86c6 |
|
10-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - rephrase logging message a bit
Make it fit with what is logged from the link. |
37ebeb77cf94ef0222cbe3b19eaad8a0a53702f1 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - drop if creation fails
This ensures that all links waiting to be enslaved are notified that the netdev does not exist. |
370e9930c3260cc58984ec70e44b1e2ab7676496 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: link - introduce LINGER state and link_drop()
We need the LINGER state in case we still have references to the link after it has been dropped. |
2cc7e981af27b12a6a3d4f08728281febeb450c9 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - introduce LINGER state and netdev_drop()
We need the LINGER state in case we still have references to the netdev after it has been dropped. |
59cb64e6253e445c78b9e78be5e27bae0015ea38 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - cancel all callbacks when freeing
This notifies the link that the netdev no longer exists. |
b226d99b044222739dccfa9cf9f7a9d79576c407 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: link - take refcounts on links
We need to take a refcount on the link whenever we expect a callback. The exceptions
are the ipv4ll/dhcp clients as their lifetimes are guaranteed to be shorter than that
of the link. |
14b746f72132324e637c4e39694bd474f85e19f7 |
|
09-May-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: introduce refcounting for Links and NetDevs |
69ceb044c891579fa1f5556e0980a046ccef19d4 |
|
28-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - log when loading a .netdev file |
7d95c772cba1836545459760273b13f2e01dd2a8 |
|
21-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
Revert "networkd: netdev - set predictable mac address when creating netdev"
This reverts commit cdc85c875b842b9309f72caefc51c262f521cf92.
There appears to be a kernel bug that (among other things) cause bridges
not to get a bridge id set when supplying IFLA_ADDRESS when creating the
netdev.
Simply revert the whole thing until we sort this out in the kernel.
See: http://www.spinics.net/lists/netdev/msg279807.html
Reported-by: C. R. Oldham <cr@saltstack.com> |
6916ec29afd488d91e7e0fcbcc2e006b4e5f28df |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
network: implement masking of .link, .network and .netdev files |
a21df104887552e8558d6c11388dff466641a031 |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - give up early when setting already set ifindex
We may receive RTM_NEWLINK messages with missing LINKINFO after the initial NEWLINK message,
don't bother verifying these, just drop out early after checking that the ifindex is not in conflict. |
c6315a7afc905c0b41901cf8e204306296ebb640 |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - verify name of newlink messages |
cdc85c875b842b9309f72caefc51c262f521cf92 |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - set predictable mac address when creating netdev |
505f8da7325591defe5f751f328bd26915267602 |
|
19-Apr-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: tie links to rtnl rather than udev
This essentially swaps the roles of rtnl and udev in networkd. After this
change libudev is only used for waiting for udev to initialize devices and
to get udev-specific information needed for some [Match] attributes.
This in particular simplifies the code in containers where udev is not really
useful, but also simplifies things and reduces round-trips in the non-container
case. |
ecb08ec6a5c52f2d940f3b8147e2a480affd46e1 |
|
05-Apr-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix a few return codes in error paths |
ba5596ec2ed65943b66d42fbe6e9ef7ebc79216c |
|
28-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - improve logging when setting ifindex |
d8e538ecd9e62f841242f07e3df5c835c1ba6313 |
|
28-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
sd-rtnl: rework rtnl type system
Use a static table with all the typing information, rather than repeated
switch statements. This should make it a lot simpler to add new types.
We need to keep all the type info to be able to create containers
without exposing their implementation details to the users of the library.
As a freebee we verify the types of appended/read attributes.
The API is extended to nicely deal with unions of container types. |
79e16ce3bf734434081e57f1170333277830a592 |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
networkd: fix a couple of memory leaks |
c3ebdce39a748f738f3731730cd085ff3551b379 |
|
24-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - fix error handling in set_ifindex()
Firstly, remove stray assert(). Also be a bit stricter when verifying the
received info. If we get an applicable newlink message that we can't make
sense of, we will now enter NETDEV_FAILED, as we cannot reasonably continue
without knowing the ifindex of our device. |
d39edfc72f9296078a18014627bf0a2543b60627 |
|
24-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - verify that newlink messages has the expected kind
We match 'newlink' messages with expected netdev's based on their names. Now also
make sure that the receieved link has the expected kind. |
c6f7c917a1b494d4455800823472227463f87438 |
|
21-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
libsystemd-network: move network-utils from src/shared
This does not belong in shared as it is mostly a detail of our networking subsystem.
Moreover, now we can use libudev here, which will simplify things. |
e09826dcf13a17cd63d900502282c511a06ecbe8 |
|
15-Mar-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - support joining already existing netdevs |
2c5859afecee81e345fc9526b1083bf79990ffb8 |
|
07-Mar-2014 |
Daniel Mack <zonque@gmail.com> |
Make tables for DEFINE_STRING_TABLE_LOOKUP consistent
Bring some arrays that are used for DEFINE_STRING_TABLE_LOOKUP() in the
same order than the enums they reference.
Also, pass the corresponding _MAX value to the array initalizer where
appropriate. |
fe6b2d55bcb379d01664ed28cea40634cb6b52e3 |
|
25-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: add basic support for MACVLANs |
bf175aafd20c9ef974709ef12c5acf836121af33 |
|
21-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
net-util: match on the driver as exposed by ethtool if DRIVER not set
Also fix a copy-paste error that broke matching on interface name. |
edbb03e95a3c31bf719d5c6c46eec14d0bcb9c8f |
|
21-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
.network/.netdev/.link: allow to match on architecture |
c0dda18697e0994272c0c9616d36f6777b60e2c7 |
|
20-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - allow filtering on kernel cmdline, host and virt |
151b9b9662a90455262ce575a8a8ae74bf4ff336 |
|
20-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:
1. The object the new object is derived from is put first, if there is any
2. The object we are creating will be returned in the next arguments
3. This is followed by any additional arguments
Rationale:
For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.
Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.
Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that. |
4fb7242cbbed0d865eb343548b8f0ee0fee71d85 |
|
18-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
sd-rtnl-message: store reference to the bus in the message
This mimics the sd-bus api, as we may need it in the future. |
ee3a6a51e5b098aa0c9641ed71d275c459ad2f5a |
|
15-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
sd-rtnl: message_open_container - don't take a 'size' argument
We can always know the size based on the type, so let's do this inside the library. |
31a4e15384b3819621dd5648e18148c2edea72d3 |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
rtnl: support adding VETH_INFO_PEER containers into rtnl messages |
d595c5cc9e894c3608ed634052b0ba93aa94bf2f |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to sd_rtnl_xxx_new_yyy()
So far we followed the rule to always indicate the "flavour" of
constructors after the "_new_" or "_open_" in the function name, so
let's keep things in sync here for rtnl and do the same. |
cf6a8911738fe2635a5210769d5348b05b166691 |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
rtnl: drop "sd_" prefix from cleanup macros
The "sd_" prefix is supposed to be used on exported symbols only, and
not in the middle of names. Let's drop it from the cleanup macros hence,
to make things simpler.
The bus cleanup macros don't carry the "sd_" either, so this brings the
APIs a bit nearer. |
672682a6b9d6fb6a3722c3fea1a93b4831747b54 |
|
10-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: VLAN - allow multiple vlans to be created on a link
Also limit the range of vlan ids. Other implementations and
documentation use the ranges {0,1}-{4094,4095}, but we use
the one accepted by the kernel: 0-4094.
Reported-by: Oleksii Shevchuk <alxchk@gmail.com> |
1a436809498faf6486815baa0338fb6b8e5def07 |
|
07-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - rename Netdev to NetDev
Both in the configuration file format and everywhere else in the code. |
172f6635d164b9c59290fae253bc0698c0627afa |
|
01-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: remove unused variable |
c3ab23898f5794ab0f0705475cbfc27f8e9163a6 |
|
31-Jan-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: don't check for ifindex in answer to RTM_NEWLINK
The kernel will not be changed to support this, so drop the code. Listening
for all RTM_NEWLINK messages and filtering on name is reliable, so it is not
a problem. |
50add2909c2e4b13a04d285b058b1c2270137656 |
|
30-Jan-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: netdev - reduce chance of race when receiving netdev's ifindex
When creating a new link, the kernel will not inform us about the new ifindex
in its ack. We have to listen for newly created devices and deduce the new
ifindex by matching on the ifname.
We used to do this by waiting for a new device from libudev, but that is asking
for trouble, as udev will happily rename the device before handing it to us.
Listen on rtnl instead, the chance of the name being changed before reaching us
is much smaller (if not nil).
Kernel patch in the works to make this unneccessary. |
54abf461d6b10dc270c4bb2aeac65f240ff1c5cd |
|
25-Jan-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: add basic VLAN support |
52433f6b65eccd1c54606dde999610640f3458ac |
|
22-Jan-2014 |
Tom Gundersen <teg@jklm.no> |
networkd: add basic bonding support
Refactor bridging support to be generic netdev support and extend it to
cover bonding as well. |