[Babel-users] [PATCH] interface: clarify error message when adding existing interface

Christof Schulze christof.schulze at gmx.net
Sun Dec 2 22:15:10 GMT 2018


When adding a network interface that is already known to babeld, an
error message is displayed and the new configuration is ignored. This
message is adjusted to include the name of the interface being added so
it is visible from the logs without context
---
  interface.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface.c b/interface.c
index 7000080..9d1c645 100644
--- a/interface.c
+++ b/interface.c
@@ -68,8 +68,8 @@ add_interface(char *ifname, struct interface_conf *if_conf)
          if(strcmp(ifp->name, ifname) == 0) {
              if(if_conf)
                  fprintf(stderr,
-                        "Warning: attempting to add existing interface, "
-                        "new configuration ignored.\n");
+                        "Warning: attempting to add existing interface (%s), "
+                        "new configuration ignored.\n", ifname);
              return ifp;
          }
      }
-- 
2.11.0




More information about the Babel-users mailing list