summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/interfaces.inc
Commit message (Collapse)AuthorAgeFilesLines
* add validation via validate_ipv4_list to interfaces.inclukehamburg2017-04-041-1/+1
|
* Adds ability to ignore DHCP offers from multiple serverslukehamburg2017-03-291-0/+21
| | | | | | | | | | - Forum thread: https://forum.pfsense.org/index.php?topic=124046.msg705100#msg705100 - related dhclient source: https://github.com/pfsense/FreeBSD-src/blob/devel/sbin/dhclient/clparse.c#L945 **changed files:** /usr/local/www/interfaces.php /etc/inc/interfaces.inc
* Merge pull request #3515 from marjohn56/masterjim-p2017-03-151-50/+160
|\
| * Fix Vars for Interface namingmarjohn562017-03-121-6/+6
| |
| * WAN flap loss of IPv6marjohn562017-03-121-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hardware is taking too long to set ACCEPT_RTADV on the Interface, this results in RTSOLD exiting and this not sending RS to start the process. Apart from adding a delay to the start of RTSOLD which did improve but not totally fix the issue the other change is to prevent the call to -ACCEPT_RTADV if the interface is using DHCP6. -ACCEPT_RTADV in the case of wancfg['dhcp6usev4iface'] || $wancfg['ipaddr']==='ppp' Cleaning up dhcp6c kill calls. ppp-ipv6 Changed to call kill_dhcp6client_process() to make sure the lock files are also cleared. Interfaces.php Changed to call kill_dhcp6client_process() to make sure the lock files are also cleared.
| * New dhcp6c features REASONS and signalsmarjohn562017-03-081-42/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR takes advantage of modifications and additions to dhcp6c. Firstly, a fix has been made to dhcp6c where the pid was being deleted before all processes had completed; this could leave dhcp6c sending release signals but any check for the process using the pid would return false; thus if the server was not responding or the WAN was down then dhcp6c could sit there for tens of seconds even though it appeared to have exited. The env var REASON has been updated to provide information as to why the script has been called. These can be one of the following: REASON=INFO REASON=REPLY REASON=RENEW REASON=RELEASE REASON=REBIND REASON=EXIT REASON=OTHER The OTHER is a final catch and should never happen. The scripts take advantage of these vars, for example a renew no longer calls rc.newwanipv6. The use of SIGUSR1 and SIGUSR2 to terminate dhcp6c results in different exits. SIGUSR1 will force an exit without sending a release to the server, this is used in the case of a WAN down event to prevent dhcp6c from hanging on a release signal. SIGUSR2 is used to send a relase signal overiding the no-release flag ( if set ), no code or GUI additions have been added to make use of this signal in this PR. The existing SIGTERM will cause dhcp6c to exit normally obeying the no-release flag if set. NOTE - The code for SIGUSR2 is in place in this file but as yet it is not included in dhcp6c. In the event of SIGUSR2 being called, it will fall through to a standard SIGTERM exit. Debugging messages have been added to the scripts dhcp6c_{$interface}dhcp6withoutra_script.sh and dhcp6c{$interface}_script.sh. These debug messages only appear if the debug setting for dhcp6c has been set in the config, they also appear in the dhcp log rather than the main system log. This PR is dependant on PR#5 at hrs-allbsd:freebsd or pfsense/FreeBSD-ports #299 These changes are in response to Redmine 5993, 6944, 7145 and 7185. Updated to match new upstream dhcp6c changed REASON=REPLY to REASON=REQUEST. K&R Corrections
* | Sort the interface names.Luiz Otavio O Souza2017-03-141-6/+7
| | | | | | | | No functional change.
* | Add reason to write_config() calldoktornotor2017-03-051-2/+2
| |
* | Vendor MAC Retention File ConsolidateNOYB2017-02-151-5/+3
| | | | | | | | | | | | | | Use a single file for vendor MAC retention (vendor_mac). a) Writes only one file during boot up rather than a file for each interface. b) More efficient than numerous tiny files. c) Friendlier to write cycle sensitive media in a RAM disk disabled system.
* | Vendor MAC Retention File RelocateNOYB2017-02-151-1/+1
| | | | | | | | | | | | Relocate the vendor MAC retention file to /var/db directory. a) It's more at home here with other network interface stuff. b) Friendlier to write cycle sensitive media in a RAM disk enabled system.
* | Vendor MAC Restore LogicNOYB2017-02-151-1/+6
| | | | | | | | | | | | Only use the vendor MAC retention file for restoring the vendor MAC when not booting. a) During boot up the current MAC that is obtained from the system is the vendor MAC. b) Using this eliminates the inefficient need to open the vendor MAC retention file for every interface during system boot up.
* | Spoof MAC Var NameNOYB2017-02-151-5/+5
|/ | | | | | Rename 'spoof_mac' var to generic 'mac_addr'. a) It may be the vendor MAC or a spoofed MAC. b) Update the comment re: not reapplying an already applied MAC.
* Add cpsw to ALTQ list now that the driver supports ALTQ. Ticket #7199jim-p2017-02-071-1/+1
|
* Remove \n from gettext stringsRenato Botelho2017-02-031-1/+1
|
* Fix #7120: Restore vendor mac address when spoofmac is set to blankRenato Botelho2017-02-031-5/+21
|
* Simplify logicRenato Botelho2017-02-031-14/+11
|
* Fix indent and spacesRenato Botelho2017-01-261-54/+124
|
* Escape $ to avoid replacing it by PHP variablesRenato Botelho2017-01-261-4/+4
|
* Merge pull request #3410 from ↵Renato Botelho2017-01-261-25/+97
|\ | | | | | | marjohn56/RTSOLD-lock-creation,-dhcp6c-launch-&-kill-changes-#3
| * Update interfaces.incmarjohn562017-01-241-2/+2
| |
| * Changed logging calls and style correction.marjohn562017-01-201-4/+4
| |
| * RTSOLD lock creation, dhcp6c launch & kill changes #3marjohn562017-01-201-25/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added lock file creation and check to RTSOLD script creation. This is to prevent mutliple launches of dhcp6c, this appears to happen when multiple RA's are received in rapid succession at the start of a session. Once created dhcp6c cannot be launched again until the lock file is deleted, this is done within the kill_dhcp6_client process locking the two together. The kill vlaue used to kill the dhcp6c client is now variable. The value -9 causes the process to exit without sending a release if required, and if the timing is just rignt can cause the pid file to be left behind; -15 allows for a graceful exit and if the release flag is not set then it sends and waits for the release confirnation, the value now switches between those depending on the configuration option 'No Release'. If no release is true then -9 is used as the type. Any left behind pid is removed automatically. This change will make it possible to stop the use of the -n flag, thus allowing the dcp6c to send a release manually, if so required. The launch of dhcp6c when in dhcp6withoutRA is moved to its own function, as uch as anything this makes the code tidy around the bottom of nterface_dhcpv6_configure(). A completely new method of implimenting dhcp6wihtoutRA is used. In default mode RTSOLD launches dhcp6c. In dhcp6wihtoutRA mode dhcp6 aunches RTSOLD. New scripts are created and old ones modified to handle this mode, the dhcp6 conf file changes depending on the mode calling a different script for each mode. In simple terms its dcp6->rtsold- lan_configure. Whenever dhcp6 gets a response that launches its script then it will run rtsold, the RA in turn will cause the wan6 configure script to run. This method also means the script only ever runs once and no modified dhcp6c is required. The scripts are dynamic and change depending on the mode. Creation takes into account that the domain-name-server variables created by dhcp6 and passed to the script it calls are passed on. In default mode this is simple as it calls the dhcp6c_*_script which calls the rc.newwanipv6 script directly, in dhcp6withoutRA its RTSOLD that calls the dhcp6c_*_script, so in order to make this change work the variables are echoed to the tmp folder and retreived by the dhcp6withoutRA version of dhcp6c_*_script when that calls rc.newwanip.
* | Always force compress when calling Net_IPv6Phil Davis2017-01-221-3/+3
|/
* Fix #6603: Wait while interface is in 'tentative' state before try to bind ↵Renato Botelho2017-01-171-0/+18
| | | | OpenVPN to its address
* Merge pull request #3304 from marjohn56/masterjim-p2017-01-021-0/+7
|\
| * User Defined DUIDmarjohn562016-12-211-0/+7
| | | | | | | | | | | | | | User may define a DUID to use in System->Advanced->Networking. The entered DUID is validated for composition and length, if valid it is stored in the config.xml. On call of wan_dhcp6_configure() the DUID is written to file to be read by dhcp6c on launch.
* | Implement a different method to obtain the 'main' IP (v4) for the interface.Luiz Otavio O Souza2016-12-291-3/+17
| | | | | | | | | | | | | | | | | | | | The last interface IP is always saved in /var/db/${interface}_ip. Use that file, if it exist, to find the main interface IP. The file is created by the same process and function that call 'ifconfig setfirst', so the presence of that file should produce a very similar behavior. If the file does not exist, fallback to previous behavior (return the first IPv4 found on interface). Ticket #7042
* | Refactor interface_has_dhcpPhil Davis2016-12-221-19/+21
| | | | | | | | to reduce nesting
* | Fix #7031 Allow interfaces that use DHCP for OpenVPNPhil Davis2016-12-221-0/+46
| | | | | | | | | | | | even though the interface (or gateway group) has not yet actually received an IP address. This is useful when setting up a new system that is currently offline.
* | Fix missed reference to the pfSense-dhclient-script move.jim-p2016-12-211-1/+1
|/
* dhcp6c no releasemarjohn562016-12-191-2/+4
| | | | | | Script changes to allow no-release option of dhcp6c. These changes to be used in conjunction with pfSense/FreeBSD-ports/net/dhcp6c recent change from PR #231
* Improve input validation on static ARP for DHCP static mapping entries, also ↵jim-p2016-11-291-2/+4
| | | | prevent the backend from attempting to apply entries with insufficient information stored. Fixes #6969
* Change wireless interface descriptionRenato Botelho2016-11-231-3/+3
|
* Ticket #6770: Create a function to list available wireless interfaces and ↵Renato Botelho2016-11-221-0/+21
| | | | include model description
* Fix #6899Luka Pavlyuk2016-11-071-0/+3
|
* Enable ALTQ for cxl. Fixes #6830Renato Botelho2016-11-041-1/+1
|
* Fix #6828Renato Botelho2016-10-181-4/+4
| | | | | | | | Until 2.3.x pfSense carried a patch that changed the behavior of 'route change' command, making it add the route when it fails to change. On 2.4 this patch was removed and will not be added back. This change adjust PHP code to deal with route add / change and make it work without the patch
* Merge pull request #3180 from valneacsu/fix_wifi_1st_VAP_paramsRenato Botelho2016-10-131-2/+3
|\
| * Remove commented codeValentin Neacsu2016-10-121-5/+0
| |
| * Bring up the wifi interface only after setting up all the other arguments. ↵Valentin Neacsu2016-10-091-2/+8
| | | | | | | | This prevents issues when using VAPs.
* | Remove all calls to conf_mount_r* functionsRenato Botelho2016-10-121-6/+0
| |
* | Merge pull request #3169 from valneacsu/fix_wifi_channel_changeRenato Botelho2016-10-121-7/+8
|\ \
| * | Use tabs consistentlyValentin Neacsu2016-10-021-2/+2
| | |
| * | Re-enable executing the wifi mode command first. This fixes channel ↵Valentin Neacsu2016-10-011-7/+8
| |/ | | | | | | changing, which broke in d325e90818db2b22fc2562c38493769f217230f2.
* | Only configure wireless MAC address if a spoofed MAC address is setValentin Neacsu2016-10-021-9/+6
|/
* Move copyright from ESF to NetgateRenato Botelho2016-09-061-1/+1
|
* Force changes in routing to be detected by the systemNewEraCracker2016-09-021-1/+2
| | | | When dhcp6c without RA is enabled, dhcp6c isn't killed and respawned, this causes the system not being able to pick up the routing changes. In this case, running the configuration script which fires rc.newwanipv6 solves the problem.
* DHCP6 Before RA. Additions and ammendmentsmarjohn562016-09-021-26/+15
| | | | | | | | Replaced posix_kill() in kill_dhcp6client_process() with mwexec("kill -9 $pid"), this is because the posix_kill call was not reliably killing the dhcp6c process, kill -9 works every time. Changes to the rtsold script creation. The script lines starting dhcp6c should not have be written to the script when dhcpwithoutra is true. Style corrections, I spend more time doing these than changing code!
* Merge pull request #3122 from NewEraCracker/patch-11Renato Botelho2016-09-021-9/+10
|\
| * Improve dhcpd and dhcpleases reloadNewEraCracker2016-08-241-9/+10
| | | | | | | | | | | | 1) Avoid running services_dhcpd_configure() more times than needed. 2) Always restart dhcpleases after it's killed during interface recycle. 3) It's not necessary to restart dhcpdv4 when doing changes in ipv6 config.
OpenPOWER on IntegriCloud