)]}'
{
  "commit": "67f237c9f9c7902df5a5c8c8aa30836827f3f0cf",
  "tree": "32c6b8343f874ba3e69e27aed8dc679d045d2428",
  "parents": [
    "b58afb675562afb5b9e3844242cc4bcea6fa0956"
  ],
  "author": {
    "name": "William A. Kennington III",
    "email": "wak@google.com",
    "time": "Sat Oct 10 22:33:34 2026 +0000"
  },
  "committer": {
    "name": "William A. Kennington III",
    "email": "wak@google.com",
    "time": "Thu Oct 29 17:59:57 2026 +0000"
  },
  "message": "meta-google: networking: Only rewrite network config that changed\n\nsystemd-networkd reconfigures the interfaces of every .network file\nwhose mtime or inode changed on its next reload, even when the contents\nare the same. Several scripts rewrote their .network, .netdev, .link,\ndrop-in and nftables files unconditionally and in place, causing\nunnecessary reconfigures on reload and risking partial reads.\n\nAdd gbmc_net_write_if_changed, gbmc_net_rm_if_exists and\ngbmc_net_networkd_write_dropin to gbmc-net-lib.sh and use them across\nthe networking and ncsi scripts. They write through a .tmp.$BASHPID file\nwhen the contents change, remove files when the contents are empty, and\nautomatically reload networkd or nftables when a file under\nsystemd/network or nftables is written or removed. The temporary file\nis never read, as networkd only loads files ending in .network,\n.netdev, .link or .conf, and nftables only includes *.rules.\n\nSeveral scripts reloaded networkd only when an ip(8) command failed.\nSuch a reload never changed anything, as networkd only reconfigures the\nlinks whose config changed, so drop it and leave the reloads to the\nfile writes. Add gbmc_net_proxy_ndp_add and gbmc_net_rule_replace for\nthe proxy NDP and policy rule updates that these scripts repeat.\n\ngbmc-ra used to apply its gateway drop-ins only with ip(8) and never\nreloaded networkd, as the reload \"can break phosphor-networkd\". Its\ndrop-ins now go through the same helpers, so networkd reloads when they\nchange, i.e. when the router changes, and reconfigures RA_IF. This is\nthe same plain reload that phosphor-networkd itself requests whenever\nit writes its config. Without it the new drop-ins sat unapplied until\nthe next unrelated reload reconfigured RA_IF anyway, at an arbitrary\ntime.\n\ngbmc-nic-devlab-config now writes its files under /run rather than /etc\nwhen GBMC_AVOID_RWFS is set, like the other scripts.\n\nTested: Unit tests in gbmc-net-lib-test.sh and gbmc-nic-neigh-test.sh.\n\nChange-Id: Ibf6e0375e42467c46f61f8ec76f2a33d7ec1db48\nSigned-off-by: William A. Kennington III \u003cwak@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7f4bc9b16e8a1dd37152e20374e44f71c5844b06",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in",
      "new_id": "5ac182e0ef7e4a4f58abd7d990d8fd964e62feb7",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in"
    },
    {
      "type": "modify",
      "old_id": "22cf0be318795bd2e768c84c1b4bf17a2fc85f62",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in",
      "new_id": "9fb8c26dda12dce58bb87c021b05d7ff3190c100",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in"
    },
    {
      "type": "modify",
      "old_id": "18665949fa27fb88dbd082bfa629495fe7c5ef9e",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-ra.sh.in",
      "new_id": "062847a12b7c84ffc757c25512d8c7d102196bb3",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-ra.sh.in"
    },
    {
      "type": "modify",
      "old_id": "12800fc43e27e7604ce14daadb9eb26ded4e76b5",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in",
      "new_id": "4f6d5841a8e8778ab5702134fc91112b0ae5cc3d",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/ncsi/files/gbmc-ncsi-smartnic-wa.sh.in"
    },
    {
      "type": "modify",
      "old_id": "97bfe45527b9cff1a16af1aad48eaaeaab95fa71",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/files/gbmc-mac-config.sh.in",
      "new_id": "08a6c2a63b133461fcff260f278b5732585ee5cf",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/files/gbmc-mac-config.sh.in"
    },
    {
      "type": "modify",
      "old_id": "a0a0843de365390a4c2a41d49dc522363f033b5e",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh",
      "new_id": "bcbea0bdc0e8623f8b52761a3bd510f32e1519ff",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-from-ra.sh"
    },
    {
      "type": "modify",
      "old_id": "7941594e2faf6eee3857bfc4d342a1f880f36b49",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh.in",
      "new_id": "ee3e974993d70c55f9f05228505871ba580ffa21",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-gw-src.sh.in"
    },
    {
      "type": "modify",
      "old_id": "fc9888b2252ababc27797b6e7233f80cc1a39d80",
      "old_mode": 33261,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-hostname.sh",
      "new_id": "9c16e5ec4b725723d0f8d704ba9636d153845ee8",
      "new_mode": 33261,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-hostname.sh"
    },
    {
      "type": "modify",
      "old_id": "a60c758ea5df61476b34786a517f3375f12b8b20",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh",
      "new_id": "70959f1f7e726cfb9e1515cfd21ba85b0bfd91e3",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh"
    },
    {
      "type": "modify",
      "old_id": "549bc466a6f7bd9e02e0daa3d2c58fd46e6fb7c6",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh",
      "new_id": "87d161ba3903416c2b596d3dda9e1b19043c80ba",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh"
    },
    {
      "type": "modify",
      "old_id": "1bdbd95e6844521780a4e6415f579ce7abd9fce9",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh",
      "new_id": "c806458e84935e9345c1ee42ed5118565f9e7fbf",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-ula.sh"
    },
    {
      "type": "modify",
      "old_id": "1573591d85d63c4b5371c83c6d0cabdecbec35fb",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-mac-config.bb",
      "new_id": "53a51bb008fd9eec9c8883151c51f69f6a590930",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-mac-config.bb"
    },
    {
      "type": "modify",
      "old_id": "6f8b35e05575e065b280febec17c309e025401ec",
      "old_mode": 33261,
      "old_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-net-lib-test.sh",
      "new_id": "e4cc07ac54b966a92ca02931e51790da826cb498",
      "new_mode": 33261,
      "new_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-net-lib-test.sh"
    },
    {
      "type": "modify",
      "old_id": "b132eaba8f00df2a92f0adf9f08d9e5a75e09325",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-net-lib.sh",
      "new_id": "6628573dd78eb55fd711b901704fde052cb1db45",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-net-lib.sh"
    },
    {
      "type": "modify",
      "old_id": "323ed4b5747b92ff018260b39ce943922bdef0e4",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-ra.sh",
      "new_id": "914ce9e5b9082f76073f9ea2d8442ced9763fc12",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-net-common/gbmc-ra.sh"
    },
    {
      "type": "modify",
      "old_id": "5e49a4d4553846a1c2cdebe266dc9417a27efb92",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-cn.sh.in",
      "new_id": "69d2d009c011f5eddd44617e60e346c2441c7909",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-cn.sh.in"
    },
    {
      "type": "modify",
      "old_id": "1eae2132c72ca23d881a5aed31e6b05ac7530517",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-devlab-config.sh.in",
      "new_id": "7105cb718deb8fb0b1649ddcd6410ce68dae5323",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-devlab-config.sh.in"
    },
    {
      "type": "modify",
      "old_id": "97a1466462b8d376271030b1f00f492098780131",
      "old_mode": 33261,
      "old_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-neigh-test.sh",
      "new_id": "391df532188b132278e363388f7a897155309384",
      "new_mode": 33261,
      "new_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-neigh-test.sh"
    },
    {
      "type": "modify",
      "old_id": "6ab68920b3a1325b28735d6b1c7eea5c2df17460",
      "old_mode": 33188,
      "old_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-neigh.sh.in",
      "new_id": "a238f3b2a4957f795025f41101631eb80bcd40f2",
      "new_mode": 33188,
      "new_path": "meta-google/recipes-google/networking/gbmc-nic-config/gbmc-nic-neigh.sh.in"
    },
    {
      "type": "modify",
      "old_id": "cc99cb5dcec529a6faf2742b0962d38029cbeadb",
      "old_mode": 33261,
      "old_path": "meta-google/recipes-google/networking/google-usb-network/usb_network.sh",
      "new_id": "b470983146bc3242def268e3ad871257e05c604e",
      "new_mode": 33261,
      "new_path": "meta-google/recipes-google/networking/google-usb-network/usb_network.sh"
    }
  ]
}
