chiark / gitweb /
networkd: set route protocol
authorDan Williams <dcbw@redhat.com>
Tue, 22 Jul 2014 21:54:47 +0000 (16:54 -0500)
committerTom Gundersen <teg@jklm.no>
Wed, 23 Jul 2014 07:19:32 +0000 (09:19 +0200)
commit28cc555d8504c9429776aedbbe1fee7101258578
tree9b681a3243156df7113eaf82ad5811c8a6138a1f
parent82eb1e7efbe3ca8620d2b183af37c4fd34bf8bb3
networkd: set route protocol

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']
src/libsystemd/sd-rtnl/rtnl-message.c
src/libsystemd/sd-rtnl/test-rtnl.c
src/network/networkd-link.c
src/network/networkd-route.c
src/network/networkd.h
src/systemd/sd-rtnl.h