summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-01-18 23:26:53 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-01-18 23:26:53 +0000
commit9b80c4fe9ef02d77bb4d2cedf41da21bdaaec693 (patch)
treec5e64834564ef78ad3b79b591434701224742578 /sys/net
parentc57408e4aab7a5e8adc1770400fc3620b0a6625e (diff)
Rewriting the lladdr can now be done without using mbuf tags.
Advertisements run through the carp interface first. So we just take the address from ifp0. While we're there, also remove carp_macmatch6, which isn't used anymore. Proposed by mcbride@ ok mcbride@, pascoe@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c9
-rw-r--r--sys/net/if_fddisubr.c9
-rw-r--r--sys/net/if_tokensubr.c11
3 files changed, 13 insertions, 16 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index c89daabab6e..2a832916b5c 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.87 2004/12/19 03:25:36 mcbride Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.88 2005/01/18 23:26:52 mpf Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -494,10 +494,9 @@ ether_output(ifp0, m0, dst, rt0)
sizeof(eh->ether_shost));
#if NCARP > 0
- if (ifp->if_carp) {
- error = carp_fix_lladdr(ifp0, m, dst, NULL);
- if (error)
- goto bad;
+ if (ifp0 != ifp && ifp0->if_type == IFT_CARP) {
+ bcopy((caddr_t)((struct arpcom *)ifp0)->ac_enaddr,
+ (caddr_t)eh->ether_shost, sizeof(eh->ether_shost));
}
#endif
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 1d9715919c3..9a8a67d0a41 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.43 2004/12/19 03:25:36 mcbride Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.44 2005/01/18 23:26:52 mpf Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -414,10 +414,9 @@ fddi_output(ifp0, m0, dst, rt0)
bcopy((caddr_t)ac->ac_enaddr, (caddr_t)fh->fddi_shost,
sizeof(fh->fddi_shost));
#if NCARP > 0
- if (ifp->if_carp) {
- error = carp_fix_lladdr(ifp0, m, dst, NULL);
- if (error)
- goto bad;
+ if (ifp0 != ifp && ifp0->if_type == IFT_CARP) {
+ bcopy((caddr_t)((struct arpcom *)ifp0)->ac_enaddr,
+ (caddr_t)fh->fddi_shost, sizeof(fh->fddi_shost));
}
#endif
mflags = m->m_flags;
diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c
index e815b80ed9a..23d74acc58c 100644
--- a/sys/net/if_tokensubr.c
+++ b/sys/net/if_tokensubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tokensubr.c,v 1.17 2004/12/19 03:25:36 mcbride Exp $ */
+/* $OpenBSD: if_tokensubr.c,v 1.18 2005/01/18 23:26:52 mpf Exp $ */
/* $NetBSD: if_tokensubr.c,v 1.7 1999/05/30 00:39:07 bad Exp $ */
/*
@@ -409,15 +409,14 @@ token_output(ifp0, m0, dst, rt0)
#if 0
send:
#endif /* 0 */
+
#if NCARP > 0
- if (ifp->if_carp) {
- error = carp_fix_lladdr(ifp0, m, dst, NULL);
- if (error)
- goto bad;
+ if (ifp0 != ifp && ifp0->if_type == IFT_CARP) {
+ bcopy((caddr_t)((struct arpcom *)ifp0)->ac_enaddr,
+ (caddr_t)trh->token_shost, sizeof(trh->token_shost));
}
#endif
-
mflags = m->m_flags;
len = m->m_pkthdr.len;
s = splimp();