os: [ ubuntu-latest, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
+ - name: Install libudev-dev
+ run: sudo apt install -y pkg-config libudev-dev
+
steps:
- uses: actions/checkout@v6
action = udev_device_get_action(device);
/* udev filter documentation says "usually" so double check */
- if (strcmp(subsystem, "net") == 0) {
+ if (subsystem != NULL && strcmp(subsystem, "net") == 0) {
logdebugx("%s: libudev: %s", ifname, action);
- if (strcmp(action, "add") == 0 || strcmp(action, "move") == 0)
+ if (action == NULL || ifname == NULL)
+ ;
+ else if (strcmp(action, "add") == 0 ||
+ strcmp(action, "move") == 0)
dhcpcd.handle_interface(ctx, 1, ifname);
else if (strcmp(action, "remove") == 0)
dhcpcd.handle_interface(ctx, -1, ifname);