[FIXED] DHCPv6 relay not started on boot
-
There is also a 1-line change to /etc/inc/services.inc - did you get that?
-
There is also a 1-line change to /etc/inc/services.inc - did you get that?
This? https://github.com/phil-davis/pfsense/commit/874f099a352f6e2a46f12b7b0daa6b1b5807a115.patch
No, but did now and it has absolutely no effect. Not that it could do anything:
grep dhcrelay6 /etc/inc/services.inc function services_dhcrelay6_configure() { echo "services_dhcrelay6_configure() being called $mt\n"; killbypid("{$g['varrun_path']}/dhcrelay6.pid"); $dhcrelaycfg =& $config['dhcrelay6']; $cmd = "/usr/local/sbin/dhcrelay -6 -pf \"{$g['varetc_path']}/dhcrelay6.pid\"";
See the last line.
-
This later one in the newer pull request: https://github.com/phil-davis/pfsense/commit/54a9d71ddf5d1ec4104af6d5ce849216abe752ac
It changes varetc_path to varrun_path -
Christ… reminds we exactly why I hate github…
-
After finally getting the scattered darned github stuff together - the below works for me…
--- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1404,7 +1404,7 @@ function services_dhcrelay6_configure() { return; if(isset($config['system']['developerspew'])) { $mt = microtime(); - echo "services_dhcrelay_configure() being called $mt\n"; + echo "services_dhcrelay6_configure() being called $mt\n"; } /* kill any running dhcrelay */ @@ -1505,7 +1505,7 @@ function services_dhcrelay6_configure() { return; /* XXX */ } - $cmd = "/usr/local/sbin/dhcrelay -6 -pf \"{$g['varetc_path']}/dhcrelay6.pid\""; + $cmd = "/usr/local/sbin/dhcrelay -6 -pf \"{$g['varrun_path']}/dhcrelay6.pid\""; foreach ($dhcrelayifs as $dhcrelayif) { $cmd .= " -l {$dhcrelayif}"; } --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -295,6 +295,13 @@ function get_services() { $services[] = $pconfig; } + if(isset($config['dhcrelay6']['enable'])) { + $pconfig = array(); + $pconfig['name'] = "dhcrelay6"; + $pconfig['description'] = gettext("DHCPv6 Relay"); + $services[] = $pconfig; + } + if(is_dhcp_server_enabled()) { $pconfig = array(); $pconfig['name'] = "dhcpd"; @@ -417,6 +424,9 @@ function get_service_status($service) { case "vhosts-http": $running = is_pid_running("{$g['varrun_path']}/vhosts-http.pid"); break; + case "dhcrelay6": + $running = is_pid_running("{$g['varrun_path']}/dhcrelay6.pid"); + break; default: $running = is_service_running($service['name']); } @@ -513,6 +523,12 @@ function service_control_start($name, $extras) { case 'bsnmpd': services_snmpd_configure(); break; + case 'dhcrelay': + services_dhcrelay_configure(); + break; + case 'dhcrelay6': + services_dhcrelay6_configure(); + break; case 'dnsmasq': services_dnsmasq_configure(); break; @@ -575,6 +591,9 @@ function service_control_stop($name, $extras) { case 'dhcrelay': killbypid("{$g['varrun_path']}/dhcrelay.pid"); break; + case 'dhcrelay6': + killbypid("{$g['varrun_path']}/dhcrelay6.pid"); + break; case 'dnsmasq': killbypid("{$g['varrun_path']}/dnsmasq.pid"); break; @@ -626,6 +645,12 @@ function service_control_restart($name, $extras) { case 'bsnmpd': services_snmpd_configure(); break; + case 'dhcrelay': + services_dhcrelay_configure(); + break; + case 'dhcrelay6': + services_dhcrelay6_configure(); + break; case 'dnsmasq': services_dnsmasq_configure(); break; --- a/etc/rc.bootup 2013-07-12 05:37:59.000000000 +0200 +++ b/etc/rc.bootup 2013-07-12 17:52:39.000000000 +0200 @@ -340,6 +340,9 @@ /* start DHCP relay */ services_dhcrelay_configure(); +/* start DHCPv6 relay */ +services_dhcrelay6_configure(); + /* dyndns service updates */ send_event("service reload dyndnsall");
Thumbs up, thanks! 8)
-
Good - jimp has taken these latest changes into main and 2.1 branch. The addition to the startup code (rc.bootup) hasn't got merged back into 2.1 branch yet, so it won't appear in a 2.1 snapshot. I have commented on that in GitHub and it should get noticed in due course.
-
While at it… noticed you added dhcrelay6 to services status/widget. Tried to do that with dhcrelay (not v6) without any luck
--- /etc/inc/service-utils.inc 2013-07-13 21:20:40.000000000 +0200 +++ /etc/inc/service-utils.inc 2013-07-13 20:27:25.000000000 +0200 @@ -424,6 +424,9 @@ case "vhosts-http": $running = is_pid_running("{$g['varrun_path']}/vhosts-http.pid"); break; + case "dhcrelay": + $running = is_pid_running("{$g['varrun_path']}/dhcrelay.pid"); + break; case "dhcrelay6": $running = is_pid_running("{$g['varrun_path']}/dhcrelay6.pid"); break;
Guess I'm missing some additional place.
-
The way it detected if dhcrelay was enabled was simply wrong (or out-of-date).
Fixed by: https://github.com/pfsense/pfsense/pull/712
Hopefully this clears up all the control issues for dhcrelay* :) -
The way it detected if dhcrelay was enabled was simply wrong (or out-of-date).
Fixed by: https://github.com/pfsense/pfsense/pull/712
Hopefully this clears up all the control issues for dhcrelay* :)Tested and works fine, thanks.
-
All the changes have been merged into the 2.1 branch. They are in the latest build and working.