-cp
- memcpy(p->data + 12, p->data, p->len);
- p->len += 12;
- p->data[0] = p->data[6] = 0xfe;
- p->data[1] = p->data[7] = 0xfd;
- /* Really evil pointer stuff just below! */
- *((ip_t*)(&p->data[2])) = (ip_t)(htonl(myself->address));
- *((ip_t*)(&p->data[8])) = *((ip_t*)(&p->data[26]));
-cp
+ char *scriptname;
+ pid_t pid;
+ char *s;
+
+ if((pid = fork()) < 0)
+ {
+ syslog(LOG_ERR, _("System call `%s' failed: %m"),
+ "fork");
+ return -1;
+ }
+
+ if(pid)
+ {
+ return 0;
+ }
+
+ /* Child here */
+
+ asprintf(&scriptname, "%s/%s", confbase, name);
+ asprintf(&s, "IFNAME=%s", interface_name);
+ putenv(s);
+ execl(scriptname, NULL);
+ /* No return on success */
+
+ if(errno != ENOENT) /* Ignore if the file does not exist */
+ syslog(LOG_WARNING, _("Error executing `%s': %m"), scriptname);
+
+ /* No need to free things */
+ exit(0);