File: 40callback.patch

package info (click to toggle)
netplug 1.2.9.2-3.1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 316 kB
  • sloc: ansic: 1,207; sh: 136; makefile: 51
file content (21 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Fix WIRELESS messages spamming syslog. (Bug #569226) 

Some wireless network drivers send RTM_NEWLINK messages without a IFNAME, for
which netplug each time prints two error messages to syslog.
Search for "netlink wireless IFNAME" or for example see
http://lists.shmoo.com/pipermail/hostap/2004-March/006227.html

Change the debug level from ERROR to DEBUG and return success.
--- a/main.c
+++ b/main.c
@@ -64,8 +64,8 @@ handle_interface(struct nlmsghdr *hdr, v
     parse_rtattrs(attrs, IFLA_MAX, IFLA_RTA(info), len);
 
     if (attrs[IFLA_IFNAME] == NULL) {
-        do_log(LOG_ERR, "No interface name");
-        return -1;
+        do_log(LOG_DEBUG, "No interface name");
+        return 0;
     }
 
     char *name = RTA_DATA(attrs[IFLA_IFNAME]);