[systemd-devel] systemd-networkd 219 chokes on can device

Mads mads at ab3.no
Wed Mar 4 07:03:58 PST 2015


With the help of grawity on irc, I assembled this small patch file for a 
possible temporary workaround. Just hardcoded systemd-networkd to not 
touch the can0 interface.

--- a/src/network/networkd-manager.c    2015-02-11 17:30:31.800897770 
+0100
+++ b/src/network/networkd-manager.c    2015-03-04 15:06:42.091892185 
+0100
@@ -322,6 +322,10 @@

          switch (type) {
          case RTM_NEWLINK:
+
+                if (strcmp("can0", name) == 0)
+                        return 0;
+
                  if (!link) {
                          /* link is new, so add it */
                          r = link_add(m, message, &link);
@@ -347,6 +351,9 @@
                  break;

          case RTM_DELLINK:
+
+                if (strcmp("can0", name) == 0)
+                        return 0;
                  link_drop(link);
                  netdev_drop(netdev);




Unfortunately, it doesn't fix the problem completely. The 
systemd-networkd log now appears during boot exactly like the log in my 
previous mail when I manually restarted the service (at timestamp 
09:50:53), so it doesn't try to link_add can0 anymore. But my eth0 and 
eth1 interfaces still doesn't go up (not after manually invoking 
`systemctl restart systemd-networkd´ either). They just get configured, 
not upped.

What does the workaround lack to make that work?

- Mads


More information about the systemd-devel mailing list