This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/netfilter: add nf_conntrack_ipv4 compat module for kube-proxy
kube-proxy won't enable ipvs unless it can modprobe nf_conntrack_ipv4 and find it in the list of loaded modules afterward. Thus an alias isn't enough to maintain compatibility; we need an actual module.
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* Compatibility nf_conntrack_ipv4 module that depends on nf_conntrack | ||
* to keep kube-proxy happy. | ||
* | ||
* Copyright (c) 2018 Red Hat, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the License, or (at your option) | ||
* any later version. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/printk.h> | ||
#include <net/netfilter/nf_conntrack.h> | ||
|
||
unsigned int *pointer_to_nf_conntrack_data = &nf_conntrack_max; | ||
|
||
static int __init nf_conntrack_ipv4_init(void) { | ||
pr_notice("nf_conntrack_ipv4: loaded compatibility alias for nf_conntrack\n"); | ||
return 0; | ||
} | ||
|
||
static void __exit nf_conntrack_ipv4_exit(void) {} | ||
|
||
module_init(nf_conntrack_ipv4_init); | ||
module_exit(nf_conntrack_ipv4_exit); | ||
|
||
MODULE_DESCRIPTION("kube-proxy compatibility wrapper for nf_conntrack.ko"); | ||
MODULE_LICENSE("GPL"); |