I'm sucessfully running two 2.1 beta pfSense Firewalls with a CARP VIP on the LAN side. My cable provider hands out the WAN IP via DHCP, only the first MAC address requesting an IP gets one, subsequent requests using different MAC addresses are ignored until I reset the cable modem. That's not a problem, I simply spoof the WAN MAC address on both gateways. As it's the same on both WAN interfaces, I don't have to reset the modem in case of a failover.
Naturally I have to set the backup gateway's WAN IP address to "None" for backup operation and I need to manually set it to DHCP in case of a failover.
Which leads me to the question: What would be the most elegant way to automate switching WAN settings to "None" when a gateway is in state backup and switching to DHCP when it's master?
One should be able to control this via etc/rc.carpmaster and etc/carpbackup scripts.
I must apologize, I'm not really familiar with PHP/pfSense internals. Are there any pfSense internal funtions I could call there (something like "fuction_set-WAN-interface-to-DHCP, function_reload-filter" or do I have to write a shell script calling dhclient,pfctl etc. directly?