Project

General

Profile

Actions

Feature #3541

closed

Add "Stateless DHCP" to Router Advertisements

Added by Aqueeb Qadri over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/21/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:

Description

Hi,

I just wanted to add Stateless DHCP as an option to the drop down list of Router Advertisement modes. Its a fairy simple addition as I have documented in this video http://youtu.be/4eVx5y5EO7o

I'll also copy and paste the changes I have described in the pfSense forum post https://forum.pfsense.org/index.php?topic=73760.15

Files that need to be modified.
1. /usr/local/www/services_router_advertisements.php
2. /etc/inc/services.inc

First we modify the services_router_advertisements.php to add the "Stateless DHCP" option to the drop down box. Super easy:-

CHANGE

$advertise_modes = array("disabled" => "Disabled",
"router" => "Router Only",
"unmanaged" => "Unmanaged",
"managed" => "Managed",
"assist" => "Assisted");

TO

$advertise_modes = array("disabled" => "Disabled",
"router" => "Router Only",
"unmanaged" => "Unmanaged",
"managed" => "Managed",
"assist" => "Assisted",
"stateless_dhcp" => "Stateless DHCP");

Save and Exit. Then modify the file, services.inc. Change is at TWO places:-
CHANGE-ONE
CHANGE FROM

switch($dhcpv6ifconf['ramode']) {
case "managed":
case "assist":
$radvdconf .= "\tAdvManagedFlag on;\n";
$radvdconf .= "\tAdvOtherConfigFlag on;\n";
break;
}

TO

switch($dhcpv6ifconf['ramode']) {
case "managed":
case "assist":
$radvdconf .= "\tAdvManagedFlag on;\n";
$radvdconf .= "\tAdvOtherConfigFlag on;\n";
break;
case "stateless_dhcp":
$radvdconf .= "\tAdvManagedFlag off;\n";
$radvdconf .= "\tAdvOtherConfigFlag on;\n";
break;
}

CHANGE-TWO
CHANGE FROM

switch($dhcpv6ifconf['ramode']) {
case "managed":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous off;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "router":
$radvdconf .= "\t\tAdvOnLink off;\n";
$radvdconf .= "\t\tAdvAutonomous off;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "assist":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous on;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "unmanaged":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous on;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
}

TO

switch($dhcpv6ifconf['ramode']) {
case "managed":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous off;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "router":
$radvdconf .= "\t\tAdvOnLink off;\n";
$radvdconf .= "\t\tAdvAutonomous off;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "stateless_dhcp":
case "assist":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous on;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
case "unmanaged":
$radvdconf .= "\t\tAdvOnLink on;\n";
$radvdconf .= "\t\tAdvAutonomous on;\n";
$radvdconf .= "\t\tAdvRouterAddr on;\n";
break;
}

For CHANGE-TWO all we do is add the line
case "stateless_dhcp":
above
case "assist":

Save and exit

That's it. Hope you guys can add this to pfSense!

Actions #1

Updated by Aqueeb Qadri over 11 years ago

Please delete this request. I have figured out how to use Github pull request and submitted a pull request to have my changes added to the codebase.

Sorry for my ignorance.

Kind regards,
Aqueeb.

Actions #2

Updated by Renato Botelho over 11 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF