summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_carp.c
AgeCommit message (Collapse)Author
2005-01-06Tag all packets sent via a CARP interface for link local addressChristopher Pascoe
substitution. With this change and the previous ARP changes, all Ethernet packets sent via a CARP interface should now have the virtual MAC address as the source. ok mcbride@ niklas@
2005-01-04Move processing of ARP packets for CARP addresses to the carp interfaceChristopher Pascoe
instead of processing them in the parent interface. This causes us to send ARP packets on a carpdev with its virtual MAC address as the source, rather than the parent's physical address. Permits us to fail over cleanly when connected to devices that use the source MAC address on a received ARP request to generate an ARP entry for the requesting host, rather than going through the who-has/is-at procedure. ok niklas@ mcbride@
2004-12-22Instead of running carp_setroute synchronously, use if_addrhooks to get aChristopher Pascoe
callback after in_ifinit has run. This lets us correct any routes that in_ifinit has incorrectly added for our interface. Also be more explicit with the routing checks/changes that we make. This makes it possible to have different prefix lengths on a CARP interface and the physical interface it is bound to. ok mcbride@
2004-12-19#define sc_if sc_ac.ac_if, makes things a little more readable, andRyan Thomas McBride
kills a couple of ugly line wraps. From Max Laier. ok pascoe@
2004-12-19Make it possible for carp to work on fddi and token ring again.Ryan Thomas McBride
ok pascoe@ mpf@
2004-12-18Decrement carp_suppress_preempt when detaching an interface that hasChristopher Pascoe
been experiencing output errors. ok mcbride@
2004-12-17Temporary fix to get IPv6 working again.Marco Pfatschbacher
v6 advertisements are still received the old-fashioned way. ok mcbride@
2004-12-17Reorder code in the ethernet output path, and enhance unicast addressChristopher Pascoe
matching in the bridge receive path to make CARP operate correctly on physical interfaces that are participating in a bridge. ok mcbride@ henning@ dlg@
2004-12-17Remember to decrement carp_suppress_preempt when detaching.Ryan Thomas McBride
ok pascoe@
2004-12-15Add IFF_NOARP to carp interface, we want arp requests to be handled viaRyan Thomas McBride
carp_iamatch() on the physical interface. ok pascoe@ mpf@
2004-12-15* fix the multicast memberships removalPatrick Latifi
* less hardcoding in format strings for easier maintenance mcbride ok
2004-12-10Add carp_set_enaddr(), call carp_set_state() after changing the vhidRyan Thomas McBride
to trigger a gratuitous arp and update arp tables on other hosts.
2004-12-10Rename carp_output() to carp_fix_lladdr().Ryan Thomas McBride
2004-12-08* knfPatrick Latifi
* M_WAITOK -> M_NOWAIT * FREE() only when necessary * join_multicast6 for ip6 addresses mcbride ok
2004-12-08Remove code duplication duplication. Use carpdetach() in carp_clone_destroy().Ryan Thomas McBride
2004-12-08Merge in more fixes from a pre-carpdev diff from Chris Pascoe.Ryan Thomas McBride
2004-12-08Check if_type in carp_carpdev_state() to make sure we're notRyan Thomas McBride
dealing with a carp interface.
2004-12-07Convert carp(4) to behave more like a regular interface, much in the sameRyan Thomas McBride
style as vlan(4). carp interfaces no longer require the physical interface to be on the same subnet as the carp interface, or even that the physical interface has an adress at all, so CARP can now be used on /30 networks. ok deraadt@ henning@
2004-11-30Use %s, not %d to print the interface name. From Max Laier.Ryan Thomas McBride
2004-11-28Reverse bogus sc == NULL check in CARP_LOG(), from Max Laier.Ryan Thomas McBride
2004-11-17Improved logging for advertisement failures: Add some carpstats.carps_onomem++Ryan Thomas McBride
when sending advertisements fail due to ENOBUGS, and some CARP_LOG for other failures. From camield@
2004-11-16Call arprequest/ether_output at splsoftnet(). From Chris Pascoe.Ryan Thomas McBride
ok henning@
2004-10-28define IFT_CARP, and set if_type to that on carp interfaces insteadHenning Brauer
of hiding under IFT_PROPVIRTUAL, ryan daniel ok
2004-10-06Unbreak tcpdump on the carp interface; variable shadowing pointed out byRyan Thomas McBride
Patrick Latifi (diff based on his).
2004-10-05Call ip_output at splsoftnet() when sending advertisements; also don't stopRyan Thomas McBride
sending advertisements if we can't tag the mbuf. Problem report and fix from Chris Pascoe, thanks. ok henning@
2004-09-18Oops, copy a pointer to ac_if, not the first bytes of the struct itself.Ryan Thomas McBride
Actually this doesn't matter right now, as the first bytes of struct ifnet are a pointer to the softc, which has ac_if at the beginning and thus by fluke the pointer is correct. This also makes the sc to ifp conversion for carp_macmatch6().
2004-09-18Store the carp interface ifp in PACKET_TAG_CARP instead of a pointer toRyan Thomas McBride
carp_softc.
2004-09-16Clean up CARP_LOG macro and include the physical interfaceRyan Thomas McBride
that bogus packets arrive on.
2004-08-31Prevent backup CARP hosts from replying to arp requests, fixes strangenessRyan Thomas McBride
with some layer-3 switches. From Bill Marquette. ok henning@ mickey@ dhartmei@ and deraadt@
2004-06-24This moves access to wall and uptime variables in MI code,Thorsten Lockert
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
2004-06-10zero the cif struct correctly.Ryan Thomas McBride
2004-06-10Plug a memory leak in carp_clone_destroy()Ryan Thomas McBride
From Patrick Latifi
2004-05-31initialize struct carp_if and let vhif_nvrs counter work. ok mcbride@Marco Pfatschbacher
2004-05-30compile without INET6; ok mcbridePeter Valchev
2004-05-29Remove multicast addresses and promiscuous mode when destroying theRyan Thomas McBride
carp interface.
2004-05-29carp_ioctl() happens after ifioctl(); check flags correctly so thatRyan Thomas McBride
'ifconfig carp0 down' and 'ifconfig carp0 up' work as expected.
2004-05-25let sc_counter wrap automatically, ok mcbride@Jolan Luff
2004-05-24Check for sc->sc_ifp != NULL in carp_setroute(). Running dhclient on theRyan Thomas McBride
carp interface won't work, but it doesn't mean we should panic the box!
2004-05-16When we back off due to problems with the physical interface, advertiseRyan Thomas McBride
the backoff immediately on all of the interfaces instead of waiting for the next scheduled advertisement.
2004-05-16Remove useless test pointed out by Frank Denis <j@pureftpd.org>.Ryan Thomas McBride
2004-05-13Act like our advskew is 240 when receiving packets as well as sending ifRyan Thomas McBride
we're backing off. Makes the backoff actually work like it's supposed to instead of flip-flopping. Problem pointed out by ho@ and jakob@
2004-05-13Add cloned interface destruction to carp (ifconfig carp0 destroy).Ryan Thomas McBride
ok deraadt@
2004-05-13KNFRyan Thomas McBride
2004-05-10Make sure advskew set correctly in advertisement when configured to a valueRyan Thomas McBride
greater than 240. From Frank Denis <j@pureftpd.org>, PR3774.
2004-05-08If a carp interface has more than CARP_SENDAD_MAX_ERRORS failedRyan Thomas McBride
advertisements in a row, back off all the other interfaces, until CARP_SENDAD_MIN_SUCCESS advertisements are successful. This makes carp deal better with ip output errors.
2004-04-28Make carp(4) aware of its physical interface:Ryan Thomas McBride
- If the physical interface goes down or the link goes down, the carp interface goes down as well. - We treat this like the preemption holdoff with pfsync. So if one of the carp interfaces is known to be bad (because the physical interface it's associated with is bad), all the other carp interfaces back off: they won't preempt, and their advskew goes to 240. ok cedric@
2004-03-26don't use mbuf after free; ok mcbride, deraadt, cloderMarkus Friedl
2004-03-26Also raise advskew to 240 while we wait for pfsync to get it's bulk update.Ryan Thomas McBride
This is to deal with situations where the network is not working during boot so we become master by default - the high advskew value allows other carp boxes to preempt us when the network finally comes up. ok deraadt@ beck@
2004-03-24Correct size in error message. From mickey@Ryan Thomas McBride
ok deraadt@
2004-03-24Disable net.inet.carp.log by default.Ryan Thomas McBride
ok deraadt@