[Bug 1929560] [NEW] link mac isn't set if already up

Dan Streetman 1929560 at bugs.launchpad.net
Tue May 25 13:38:32 UTC 2021


Public bug reported:

[impact]

if link is already up, configured mac isn't set

this also affects the master/nomaster configuration

[test case]

create .network config for the link, for example:

[Match]
Name=eth0

[Link]
MACAddress=00:16:3e:ff:ff:ff

[Network]
DHCP=yes


make sure the link is already up, and restart systemd-networkd:

root at test-f:/etc/systemd/network# ip l show eth0
61: eth0 at if62: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
root at test-f:/etc/systemd/network# ip l set dev eth0 up
root at test-f:/etc/systemd/network# ip l show eth0
61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
root at test-f:/etc/systemd/network# systemctl restart systemd-networkd
root at test-f:/etc/systemd/network# ip l show eth0
61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
root at test-f:/etc/systemd/network# ip l set dev eth0 down
root at test-f:/etc/systemd/network# ip l show eth0
61: eth0 at if62: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
root at test-f:/etc/systemd/network# systemctl restart systemd-networkd
root at test-f:/etc/systemd/network# ip l show eth0
61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:16:3e:ff:ff:ff brd ff:ff:ff:ff:ff:ff link-netnsid 0

[regression potential]

any regression would likely result in incorrectly set link mac and/or
master, or failure to correctly set mac and/or master

[scope]

this is needed for g and earlier

this is fixed upstream by commit
e16e4b3bedc57919b3ecb4096e941709a5d39b8a which is included in v247 so
this is fixed already in h and later

[other info]

this moves the configuration of the link mac and master out of the
link_up() function, so this also allows repeated calls to link_up()
without reconfiguring the link mac and master. That behavior is useful
for the commits for bug 1664844

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: systemd (Ubuntu Bionic)
     Importance: Medium
     Assignee: Dan Streetman (ddstreet)
         Status: In Progress

** Affects: systemd (Ubuntu Focal)
     Importance: Medium
     Assignee: Dan Streetman (ddstreet)
         Status: In Progress

** Affects: systemd (Ubuntu Groovy)
     Importance: Medium
     Assignee: Dan Streetman (ddstreet)
         Status: In Progress

** Also affects: systemd (Ubuntu Groovy)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Changed in: systemd (Ubuntu)
       Status: New => Fix Released

** Changed in: systemd (Ubuntu Bionic)
       Status: New => In Progress

** Changed in: systemd (Ubuntu Focal)
       Status: New => In Progress

** Changed in: systemd (Ubuntu Groovy)
       Status: New => In Progress

** Changed in: systemd (Ubuntu Groovy)
   Importance: Undecided => Medium

** Changed in: systemd (Ubuntu Focal)
   Importance: Undecided => Medium

** Changed in: systemd (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: systemd (Ubuntu Bionic)
     Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: systemd (Ubuntu Focal)
     Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: systemd (Ubuntu Groovy)
     Assignee: (unassigned) => Dan Streetman (ddstreet)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1929560

Title:
  link mac isn't set if already up

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Bionic:
  In Progress
Status in systemd source package in Focal:
  In Progress
Status in systemd source package in Groovy:
  In Progress

Bug description:
  [impact]

  if link is already up, configured mac isn't set

  this also affects the master/nomaster configuration

  [test case]

  create .network config for the link, for example:

  [Match]
  Name=eth0

  [Link]
  MACAddress=00:16:3e:ff:ff:ff

  [Network]
  DHCP=yes

  
  make sure the link is already up, and restart systemd-networkd:

  root at test-f:/etc/systemd/network# ip l show eth0
  61: eth0 at if62: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  root at test-f:/etc/systemd/network# ip l set dev eth0 up
  root at test-f:/etc/systemd/network# ip l show eth0
  61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  root at test-f:/etc/systemd/network# systemctl restart systemd-networkd
  root at test-f:/etc/systemd/network# ip l show eth0
  61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  root at test-f:/etc/systemd/network# ip l set dev eth0 down
  root at test-f:/etc/systemd/network# ip l show eth0
  61: eth0 at if62: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:fc:b2:00 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  root at test-f:/etc/systemd/network# systemctl restart systemd-networkd
  root at test-f:/etc/systemd/network# ip l show eth0
  61: eth0 at if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:ff:ff:ff brd ff:ff:ff:ff:ff:ff link-netnsid 0

  [regression potential]

  any regression would likely result in incorrectly set link mac and/or
  master, or failure to correctly set mac and/or master

  [scope]

  this is needed for g and earlier

  this is fixed upstream by commit
  e16e4b3bedc57919b3ecb4096e941709a5d39b8a which is included in v247 so
  this is fixed already in h and later

  [other info]

  this moves the configuration of the link mac and master out of the
  link_up() function, so this also allows repeated calls to link_up()
  without reconfiguring the link mac and master. That behavior is useful
  for the commits for bug 1664844

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1929560/+subscriptions



More information about the foundations-bugs mailing list