summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-07-08 15:01:06 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-07-08 15:01:06 +0000
commit597895484caef14e4592ca265749624f9486b596 (patch)
treec796c4e41cdec90ea48582eda8add6748a09730c /sys
parent8cb1f48f8a1bc94e69f6215ad66d4a93286c717e (diff)
Move carp_output() call to after mcopy of MAC address so the virtual address
does not get overwritten. Report and fix from Chris Pascoe.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_fddisubr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index ab7ea077909..895b06ab002 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.38 2004/06/21 23:50:36 tholo Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.39 2004/07/08 15:01:05 mcbride Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -431,6 +431,12 @@ fddi_output(ifp, m0, dst, rt0)
#if NBPFILTER > 0
queue_it:
#endif
+ if (hdrcmplt)
+ bcopy((caddr_t)esrc, (caddr_t)fh->fddi_shost,
+ sizeof(fh->fddi_shost));
+ else
+ bcopy((caddr_t)ac->ac_enaddr, (caddr_t)fh->fddi_shost,
+ sizeof(fh->fddi_shost));
#if NCARP > 0
if (ifp->if_carp) {
int error;
@@ -439,13 +445,6 @@ fddi_output(ifp, m0, dst, rt0)
goto bad;
}
#endif
-
- if (hdrcmplt)
- bcopy((caddr_t)esrc, (caddr_t)fh->fddi_shost,
- sizeof(fh->fddi_shost));
- else
- bcopy((caddr_t)ac->ac_enaddr, (caddr_t)fh->fddi_shost,
- sizeof(fh->fddi_shost));
mflags = m->m_flags;
len = m->m_pkthdr.len;
s = splimp();