[Babel-users] [PATCH] kernel_netlink.c: Remove MAX_INTERFACES reference - no need for a limit

Christof Schulze christof.schulze at gmx.net
Sun Jun 30 22:50:24 BST 2019


This remove MAX_INTERFACES altogether. It already has a very high
threshold set and serves no useful purpose any more.

---
  kernel_netlink.c | 6 ------
  1 file changed, 6 deletions(-)

diff --git a/kernel_netlink.c b/kernel_netlink.c
index 8b7f75d..5c88daf 100644
--- a/kernel_netlink.c
+++ b/kernel_netlink.c
@@ -57,10 +57,6 @@ THE SOFTWARE.
  #include "interface.h"
  #include "configuration.h"

-#ifndef MAX_INTERFACES
-#define MAX_INTERFACES 1024
-#endif
-
  #define GET_PLEN(p, v4) (v4) ? (p) + 96 : (p)
  #define COPY_ADDR(d, rta, v4)                                           \
      do {                                                                \
@@ -648,8 +644,6 @@ get_old_if(const char *ifname)
      for(i = 0; i < num_old_if; i++)
          if(strcmp(old_if[i].ifname, ifname) == 0)
              return i;
-    if(num_old_if >= MAX_INTERFACES)
-        return -1;
      if(num_old_if >= max_old_if) {
              int n = max_old_if == 0 ? 4 : 2 * max_old_if;
              struct old_if *new =
--
2.11.0




More information about the Babel-users mailing list