Patch: Wildcard for no-auto-default.



Hello,

I had a request a few weeks back about how to get the system settings daemon to ignore all cards without hardcoding MAC addresses into the nm-system-settings.conf file. It was mentioned that there's a workaround for RedHat-based systems. I wanted something more explicit.

The attached trivial patch lets the user specify "no-auto-default=*" to have all of the connections blacklisted by the system settings daemon.

--Pat
Allows for the "*" character as a setting for no-auto-default, to ensure that
no devices are managed by NetworkManager's system settings, rather than
listing individual MAC addresses.

Pat Suwalski <pat suwalski net>

diff -ur network-manager-0.8.orig/src/system-settings/nm-sysconfig-settings.c network-manager-0.8/src/system-settings/nm-sysconfig-settings.c
--- network-manager-0.8.orig/src/system-settings/nm-sysconfig-settings.c	2010-02-18 11:01:50.000000000 -0500
+++ network-manager-0.8/src/system-settings/nm-sysconfig-settings.c	2010-07-08 13:14:58.000000000 -0400
@@ -1076,6 +1076,12 @@
 	for (iter = list; iter && *iter; iter++) {
 		struct ether_addr *candidate;
 
+		if (strncmp(*iter, "*", 1) == 0)
+		{
+			found = TRUE;
+			break;
+		}
+
 		candidate = ether_aton (*iter);
 		if (candidate && !memcmp (mac->data, candidate->ether_addr_octet, ETH_ALEN)) {
 			found = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]