-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protocolary updates for release 4.1.1
- Loading branch information
Showing
20 changed files
with
140 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ ltmain.sh | |
*.symvers | ||
.tmp_versions | ||
.cache.mk | ||
built-in.a | ||
|
||
# ? | ||
*.o.d | ||
|
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
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
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,41 @@ | ||
#include "mod/common/dev.h" | ||
|
||
#include "mod/common/linux_version.h" | ||
|
||
/* "for each interface address" */ | ||
int foreach_ifa(struct net *ns, int (*cb)(struct in_ifaddr *, void const *), | ||
void const *args) | ||
{ | ||
struct net_device *dev; | ||
struct in_device *in_dev; | ||
#if LINUX_VERSION_AT_LEAST(5, 3, 0, 9999, 0) | ||
struct in_ifaddr *ifa; | ||
#endif | ||
int result = 0; | ||
|
||
rcu_read_lock(); | ||
|
||
for_each_netdev_rcu(ns, dev) { | ||
in_dev = __in_dev_get_rcu(dev); | ||
if (!in_dev) | ||
continue; | ||
|
||
#if LINUX_VERSION_AT_LEAST(5, 3, 0, 9999, 0) | ||
in_dev_for_each_ifa_rcu(ifa, in_dev) { | ||
result = cb(ifa, args); | ||
if (result) | ||
goto end; | ||
} | ||
#else | ||
for_primary_ifa(in_dev) { | ||
result = cb(ifa, args); | ||
if (result) | ||
goto end; | ||
} endfor_ifa(in_dev); | ||
#endif | ||
} | ||
|
||
end: | ||
rcu_read_unlock(); | ||
return result; | ||
} |
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,9 @@ | ||
#ifndef SRC_MOD_COMMON_DEV_H_ | ||
#define SRC_MOD_COMMON_DEV_H_ | ||
|
||
#include <linux/inetdevice.h> | ||
|
||
int foreach_ifa(struct net *ns, int (*cb)(struct in_ifaddr *, void const *), | ||
void const *args); | ||
|
||
#endif /* SRC_MOD_COMMON_DEV_H_ */ |
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
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
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
Oops, something went wrong.