summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tokensubr.c
diff options
context:
space:
mode:
authormpf <mpf@openbsd.org>2005-01-18 23:26:51 +0000
committermpf <mpf@openbsd.org>2005-01-18 23:26:51 +0000
commitba3c70d7ffadf03fe5752bc1ce61a0fe7fd8a15c (patch)
treea710eddb832345d31581154a018a806312735bfd /sys/net/if_tokensubr.c
parentUse correct source address for ICMP errors generated from packets that were (diff)
downloadwireguard-openbsd-ba3c70d7ffadf03fe5752bc1ce61a0fe7fd8a15c.tar.xz
wireguard-openbsd-ba3c70d7ffadf03fe5752bc1ce61a0fe7fd8a15c.zip
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/if_tokensubr.c')
-rw-r--r--sys/net/if_tokensubr.c11
1 files changed, 5 insertions, 6 deletions
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();