Set this to /8 instead since that's how it's done in stock FreeBSD 10.1. Ticket #3941
Setting an interface's IP to 0.0.0.0 with mask 0.0.0.0 overwrites thedefault route with that interface's link route. Later in dhclient, thatgets deleted and leaves the system with no default route. Using a /32 maskhere works in every scenario I can find, and stops the default route...
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.
Avoid reseting firewall hostname by WAN DHCP. It should fix #3746
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...
Remove unused ppp-script
Whitespace fixes
Set the interface as first here to properly be able to identify it after in php code. Ticket #2495
Tune up a bit dhclient-script and call the kill state command only once its enough
Ticket #1629 Another round of fixes related to state clearing
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
pfctl -b is gone just use std tools of pfctl
The ISC client was far worse then the WIDE client was, back to plan ARevert "Merge changes required for using the ISC dhclient in pfSense with prefix delegation. This should hopefully be a bit more reliable in the long run."
This reverts commit 651018775c78e38045966825b920b641a0302b43....
Merge changes required for using the ISC dhclient in pfSense with prefix delegation. This should hopefully be a bit more reliable in the long run.The dhclient6-script could be merged with dhclient-script in the future.Still need to cleanup old adresses and prefixes, as well as LAN prefixes when a old prefix dissapears. This needs some thought and clue to strap together.
Some more state killing refinements.
Remove states before removing the old address, or the file will be gone and the code to kill the states won't ever run.
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.
Actaully put the route adding under the conditional logic checking. Ticket #1408.
Send route delete message to blackhole.
Ticket #1408. Do not add static routes for automatically learned dns servers from dhcp if Allow override is not selected.
Actually correct check meaning.
Do not an ip of all 1s as a gateways since it cannot be pinged.
Revert changes to dhclient-script. Appears to have broken DNS servers from DHCP. Ticket #1428
use same egrep statement for both checks
Use full path to egrep
Use some Seth egrep foo to protect from compromised DHCP servers. CVE-2011-0997
If the supplied gateway is all ones(255.255.255.255) do not report it as a gateway since its useless.
Handle the case on some special configs with a gateway of all 1's otherwise strange thing happens.
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.
Actually pass the right parameter!
Actually we do not use this code at all in pfSense.
Do not overrite the default gateway if already found.
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.
Fixes #976. Bring in the piecies for classless routing from FreeBSD 8.1 script.
Revert "comment out line that's hanging dhclient for now"
This reverts commit 53a37b66d343682700ff49d595b3ea1310ec320f.
comment out line that's hanging dhclient for now
Add as a search domain the domains suggested by dhcp.
Fix typo.
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.
Reload dns and interface properly on dynamic types.
Use the new events mechanisms to dispatch events.
Do not use netstat to fetch default gateway interface but other faster commands to avoid problems on large interface setups.
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.
Use full path and use variables to be consistent.
Fix static route for DNS from DHCP servers.
Resolve problems with dns server setup when allow override is set. Also add static routes for all nameservers to be friendly with multiwan.
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.
Simplify recording of gateway coming form ppp configuration.
Do not break rc.newwanip by putting more information than requested in the file.
use correct gateway IP for PPP
Handle secondary DNS correctly for 3G
Switch over to handling DNS from ppp.linkup allowing mulitple 3G cards to coexist on the same box
Add ppp endpoints IP as gateway
Add and use ppp-script
Remove ftp-proxy/pftpx/ftpsesame references we handle all of this in kernel now.(yay!)
Correctly set old wan ip
Set /tmp/rc.newwanip_oldip
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.
DHCP Renew does "too much"
Ticket #1260
Nuke old and unused code which was commented out.
Bring back hostname option since it is not leading to the short write errors
Sprinkle debugging statements throughout to try and obtain a read of where the dhclient process is going south.
Somehow the HOSTNAME code will lead to short write errors under unusual renew load. Comment out this code until we can figure out why this is happening.
Found-by: GAndreone@imapro.com
Do not set an exit status in dhclient-script.
From a post that I dug up from Brooks:
Why on earth are you exiting with $1 as the status? This is almostcertainly the problem. You should not exit from dhclient-exit-hooksat all since it occurs in the context of dhclient-script and this exit...
back out recent change.
Woops, log an error to system logs when we restart check_reload_status from dhclient-script instead of simply echoing out where someone may not even see it.
If for any reason check_reload_status is not started when dhclient fires of dhclient-script, restart it.
Write out old ip to /tmp/rc.newwanip_oldip
When adding nameservers to the system, add a route to the ip through the interface in question. This ensures that domain name server lookups to the nameserver goes out the correct wan address. Also before adding new entries route delete the old nameserver routes that are on file to ensure that a long uptime doesn't result in stale routes.
Pass rc.newwanip operations off to check_reload_status.c
Remove the space from #! line
Start rc.newwanip in the background
Pass interface correctly to rc.newwanip
Echo out the ip address of the interface after renewing to /var/db/${interface}_ip
MFC 6871If WAN is pppoe, hold down boot until connection is established This will help anyone with PPPOE on WAN and DHCP on OPTx not get incorrect gateways assigned.
Pass the interface in question. We're multi-wan now.
Pointy-hat-to: GeekGod
Back out last commit. /etc/rc.newwanip is supposed to trigger the filter reload
Trigger filter reload after changes
Use variables
Cleanup hacks. Only add default route if its not added already.
Add the interface as the default gateway if all else fails
Log commands run to bring up default route
Uncomment /dev/null.
More full paths to files
use full path to sed, sleep, etc
use full path to route
Simply call exit_with_hooks. We do not need to pass it a return value.
No need to check for rc.newwanip, the file will exist on pfSense
Add athctrl.sh which helps in setting distance
Dns from dhcp fixes for GG to test.
Do not echo nameserver $nameserver, simply echo $nameserver
Do not create /var/etc/resolv.conf in dhclient-script. Depend on system_resolvconf_generate() and /etc/rc.newwanip
Bring back in OpenBSD's dhclient-script for doctoring
Restore previous dhclient-script.
Use /var/etc/ for temporary staging of resolv.conf
Bring in m0n0wall specific patches on top of open's dhclient-script
Move dhclient-script to /sbin/