Commit Graph

91 Commits

Author SHA1 Message Date
Chris Buechler
a9b305a84a Set this to /8 instead since that's how it's done in stock FreeBSD 10.1. Ticket #3941 2014-11-10 21:52:52 -06:00
Chris Buechler
b0533f16c4 Setting an interface's IP to 0.0.0.0 with mask 0.0.0.0 overwrites the
default route with that interface's link route. Later in dhclient, that
gets deleted and leaves the system with no default route. Using a /32 mask
here works in every scenario I can find, and stops the default route
deletion issues. Ticket #3941
2014-11-10 21:37:20 -06:00
Chris Buechler
c75e8aed2f Disable delete_old_states in dhclient-script. rc.newwanip handles this correctly in 2.2, and this killed states in multiple circumstances where that isn't necessary nor desirable. 2014-11-05 19:33:46 -06:00
Renato Botelho
2d34e81a9f Avoid reseting firewall hostname by WAN DHCP. It should fix #3746 2014-07-07 20:12:54 -03:00
Renato Botelho
ff3da5dba6 Fix #3700 and other syntax issues:
- Remove -G parameter from pfctl since it doesn't exist anymore
- Initialize $old_router
- Fix sh syntax on variable assign, it couldn't have space before =
- Simplify logic
- Avoid flush states twice, if it was done on IP change, don't do it
  again if router also has changed
2014-06-10 10:42:52 -03:00
Ermal
0b1f997354 Whitespace fixes 2013-08-01 11:14:08 +00:00
Ermal
8540ee75c7 Set the interface as first here to properly be able to identify it after in php code. Ticket #2495 2013-08-01 11:13:49 +00:00
Ermal
1befdbf866 Tune up a bit dhclient-script and call the kill state command only once its enough 2013-03-07 10:03:35 +00:00
Ermal
096f2962a9 Ticket #1629 Another round of fixes related to state clearing 2013-02-12 12:01:29 +00:00
Ermal
8f563bb423 Use the better -Fs modifies to pf to kill the states by interface. Also kill both sides on an interface when -k needs to be used 2013-01-31 22:04:07 +00:00
Ermal
9eb49a5152 pfctl -b is gone just use std tools of pfctl 2013-01-30 10:26:14 +00:00
jim-p
96f7a687af Some more state killing refinements. 2012-09-27 00:43:57 -04:00
jim-p
80c043fa48 Remove states before removing the old address, or the file will be gone and the code to kill the states won't ever run. 2012-09-26 08:47:40 -04:00
jim-p
0649859138 Try to remove old states when a DHCP IP changes, might be related to ticket #1629 and also "unable to allocate llinfo" messages from states through an old gateway. 2012-08-29 13:30:30 -04:00
Ermal
978cf4fd6c Actaully put the route adding under the conditional logic checking. Ticket #1408. 2011-05-06 21:02:30 +00:00
Ermal
e5f3359c33 Send route delete message to blackhole. 2011-04-29 18:15:54 +00:00
Ermal
cfe9257765 Ticket #1408. Do not add static routes for automatically learned dns servers from dhcp if Allow override is not selected. 2011-04-29 18:13:57 +00:00
Ermal
e3dc055a4f Actually correct check meaning. 2011-04-22 19:48:29 +00:00
Ermal
bd17f93d4a Do not an ip of all 1s as a gateways since it cannot be pinged. 2011-04-22 19:23:37 +00:00
jim-p
4eb4b18a0f Revert changes to dhclient-script. Appears to have broken DNS servers from DHCP. Ticket #1428 2011-04-09 12:00:53 -04:00
Scott Ullrich
b510be5cc1 use same egrep statement for both checks 2011-04-07 16:17:23 -04:00
Scott Ullrich
1fd807da8a Use full path to egrep 2011-04-07 16:16:26 -04:00
Scott Ullrich
d0cc727eb7 Use full path to egrep 2011-04-07 16:15:55 -04:00
Scott Ullrich
955f2d788e Use some Seth egrep foo to protect from compromised DHCP servers. CVE-2011-0997 2011-04-07 16:11:45 -04:00
Ermal
5766add891 If the supplied gateway is all ones(255.255.255.255) do not report it as a gateway since its useless. 2011-04-06 10:42:21 +00:00
Ermal
06d30ce7db Handle the case on some special configs with a gateway of all 1's otherwise strange thing happens. 2011-03-07 21:42:39 +00:00
Ermal
c90ba62d26 Fix an issue with dhcp parameters not specifying a defaultgw and the dhcp is the only interface with gateway as a result the box is left wihtout a default gw. Some sporadic reports have been done on this. 2011-02-09 19:13:51 +00:00
Ermal
bb92b70f9c Actually pass the right parameter! 2010-12-10 01:02:10 +00:00
Ermal
409dc2e1cc Actually we do not use this code at all in pfSense. 2010-12-08 17:57:23 +00:00
Ermal
6cf1cc6116 Do not overrite the default gateway if already found. 2010-12-08 17:55:04 +00:00
Ermal
7afd6325f5 Modify dhclient-script to call rc.newwanip after all the changes to system have been done so races and no stale information can be extracted from the later. 2010-12-06 18:53:48 +00:00
Ermal
bacd881efc Fixes #976. Bring in the piecies for classless routing from FreeBSD 8.1 script. 2010-10-27 20:30:38 +00:00
Ermal
6a94b64c23 Revert "comment out line that's hanging dhclient for now"
This reverts commit 53a37b66d3.
2010-09-22 18:47:47 +00:00
Chris Buechler
53a37b66d3 comment out line that's hanging dhclient for now 2010-09-22 13:34:35 -04:00
Ermal
86dcdfc9af Add as a search domain the domains suggested by dhcp. 2010-09-16 22:42:22 +00:00
Ermal
9d1f614cf5 Fix typo. 2010-09-16 22:28:48 +00:00
Ermal
04c528e72b Ticket #876. Actually the event to send is interface newip $ip rather interface configure! also use the fact that now we have a /tmp/$if_defaultgw rather than relying in route get default which might block. 2010-09-15 19:47:39 +00:00
Ermal
0c452870cd Reload dns and interface properly on dynamic types. 2010-09-15 19:24:26 +00:00
Ermal
0ae6daf834 Use the new events mechanisms to dispatch events. 2010-09-07 19:36:53 +00:00
Ermal
155e343b82 Do not use netstat to fetch default gateway interface but other faster commands to avoid problems on large interface setups. 2010-06-01 22:23:58 +00:00
Ermal
924f202ee8 Fixes #622. Add a new file status for signaling default gateway under /tmp. dhclient script will check for this file to define if the interface needs a default gateway or not from its given routes. 2010-05-31 19:14:29 +00:00
Ermal
1fb059612c Use full path and use variables to be consistent. 2010-05-31 18:21:42 +00:00
jim-p
99b9708b2f Fix static route for DNS from DHCP servers. 2010-05-13 11:41:51 -04:00
Ermal
1033de7481 Resolve problems with dns server setup when allow override is set. Also add static routes for all nameservers to be friendly with multiwan. 2010-03-23 21:13:32 +00:00
Ermal Luçi
1570d27a49 When removing a package delete its underlying FreeBSD pacakges.
Correct checks for avioding as much as possible errors.
Simplify logic in some cases.
Remove package include files when uninstalling packages.

NOTE: Some work is needed to have more error reporting. Espescially when failing to retrieve files or add them locally.
2010-02-03 23:55:22 +00:00
Ermal Luçi
3ac300702c Do not break rc.newwanip by putting more information than requested in the file. 2009-12-21 17:39:14 +00:00
Ermal Luçi
049a688e5d Remove ftp-proxy/pftpx/ftpsesame references we handle all of this in kernel now.(yay!) 2009-03-16 17:50:44 +00:00
Scott Ullrich
866d2a177e Correctly set old wan ip 2008-11-09 05:38:41 +00:00
Scott Ullrich
0697645dfb Set /tmp/rc.newwanip_oldip 2008-11-09 05:08:18 +00:00
Ermal Luçi
6c0327f13f Remove bogus commands that adds a route to the new address pointing to dhcp.
It seems uncertain either to be a typo of $new_ip_address and $old_ip_address my test show that either cases it does more harm than good.

For now remove it altogether since it causes strange issues and makes ipsec tunnels not work on the interface with the new address.
2008-08-12 21:24:26 +00:00