diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-manager.c | 6 | ||||
-rw-r--r-- | src/network/networkd-tunnel.c | 22 | ||||
-rw-r--r-- | src/network/networkd.c | 3 | ||||
-rw-r--r-- | src/network/networkd.h | 1 |
4 files changed, 1 insertions, 31 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index c4a325de42..4b35ea0d29 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -21,7 +21,6 @@ #include <sys/socket.h> #include <linux/if.h> -#include <libkmod.h> #include "conf-parser.h" #include "path-util.h" @@ -120,10 +119,6 @@ int manager_new(Manager **ret) { return -ENOMEM; } - m->kmod_ctx = kmod_new(NULL, NULL); - if (!m->kmod_ctx) - return -ENOMEM; - m->links = hashmap_new(uint64_hash_func, uint64_compare_func); if (!m->links) return -ENOMEM; @@ -150,7 +145,6 @@ void manager_free(Manager *m) { free(m->state_file); - kmod_unref(m->kmod_ctx); udev_monitor_unref(m->udev_monitor); udev_unref(m->udev); sd_bus_unref(m->bus); diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c index e3ceb8b52b..60b16ba849 100644 --- a/src/network/networkd-tunnel.c +++ b/src/network/networkd-tunnel.c @@ -24,7 +24,6 @@ #include <net/if.h> #include <linux/ip.h> #include <linux/if_tunnel.h> -#include <libkmod.h> #include "sd-rtnl.h" #include "networkd.h" @@ -443,27 +442,6 @@ int netdev_create_tunnel(Link *link, sd_rtnl_message_handler_t callback) { assert(netdev->ifname); assert(netdev->manager); assert(netdev->manager->rtnl); - assert(netdev->manager->kmod_ctx); - - /* Load kernel module first */ - switch(netdev->kind) { - case NETDEV_KIND_IPIP: - case NETDEV_KIND_GRE: - case NETDEV_KIND_SIT: - r = load_module(netdev->manager->kmod_ctx, - netdev_kind_to_string(netdev->kind)); - if (r < 0) { - log_error_netdev(netdev, - "Could not load Kernel module: %s . Ignoring", - netdev_kind_to_string(netdev->kind)); - return r; - } - break; - case NETDEV_KIND_VTI: - break; - default: - return -ENOTSUP; - } r = sd_rtnl_message_new_link(netdev->manager->rtnl, &m, RTM_NEWLINK, 0); if (r < 0) { diff --git a/src/network/networkd.c b/src/network/networkd.c index cd7dd3ca0f..d8f31a490d 100644 --- a/src/network/networkd.c +++ b/src/network/networkd.c @@ -71,8 +71,7 @@ int main(int argc, char *argv[]) { (1ULL << CAP_NET_ADMIN) | (1ULL << CAP_NET_BIND_SERVICE) | (1ULL << CAP_NET_BROADCAST) | - (1ULL << CAP_NET_RAW) | - (1ULL << CAP_SYS_MODULE)); + (1ULL << CAP_NET_RAW)); if (r < 0) goto out; diff --git a/src/network/networkd.h b/src/network/networkd.h index 82d8d706b5..6f77c7785f 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -275,7 +275,6 @@ struct Manager { LIST_HEAD(Network, networks); usec_t network_dirs_ts_usec; - struct kmod_ctx *kmod_ctx; }; extern const char* const network_dirs[]; |