summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2007-11-22 01:21:41 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2007-11-22 01:21:41 +0000
commit9fa599e1b5a4546a8704c3933d665873b8fe8c9d (patch)
tree06ac832d0741e25d6c99fe748ec954d9453b6939 /sys/net
parent5d094e19f0f07ffec197ef0d6d399b6ff8540066 (diff)
Factor out the virtual host portion of carp into a separate struct
that is kept in a list per carp interface. This is the huge first step necessary to make carp load balancing nice and easy. One carp interface can now contain up to 32 virtual host instances. This doesn't do anything useful yet, but here is how an ifconfig for multiple entries now looks like: # ifconfig carp2 carpnodes 5:0,6:100 192.168.5.88 carp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:00:5e:00:01:05 carp: carpdev sis0 advbase 1 state MASTER vhid 5 advskew 0 state BACKUP vhid 6 advskew 100 groups: carp inet 192.168.5.88 netmask 0xffffff00 broadcast 192.168.5.255 OK mcbride@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 06712b5b49c..89cab499a31 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.111 2007/09/15 16:43:51 henning Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.112 2007/11/22 01:21:40 mpf Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -367,11 +367,8 @@ ether_output(ifp0, m0, dst, rt0)
sizeof(eh->ether_shost));
#if NCARP > 0
- if (ifp0 != ifp && ifp0->if_type == IFT_CARP &&
- !(ifp0->if_flags & IFF_LINK1)) {
- bcopy((caddr_t)((struct arpcom *)ifp0)->ac_enaddr,
- (caddr_t)eh->ether_shost, sizeof(eh->ether_shost));
- }
+ if (ifp0 != ifp && ifp0->if_type == IFT_CARP)
+ carp_rewrite_lladdr(ifp0, eh->ether_shost);
#endif
#if NBRIDGE > 0