summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2005-01-04 09:29:44 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2005-01-04 09:29:44 +0000
commitff119318dc72e6a7aab467cc2827916bbe645bd3 (patch)
tree4935cfa0eb33e898836330622196b4576d2f61e4 /sys/netinet
parentcc612858ac0a6809c1e8d29db3f768a834868322 (diff)
Use pseudo_AF_HDRCMPLT for outgoing ARP messages, otherwise the provided
source MAC address we provide is ignored by ether_output. ok mcbride@ niklas@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 1a3f81eb8a0..6a8df9af4ad 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.55 2004/12/07 20:38:46 mcbride Exp $ */
+/* $OpenBSD: if_ether.c,v 1.56 2005/01/04 09:29:43 pascoe Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -350,7 +350,7 @@ arprequest(ifp, sip, tip, enaddr)
bcopy((caddr_t)enaddr, (caddr_t)ea->arp_sha, sizeof(ea->arp_sha));
bcopy((caddr_t)sip, (caddr_t)ea->arp_spa, sizeof(ea->arp_spa));
bcopy((caddr_t)tip, (caddr_t)ea->arp_tpa, sizeof(ea->arp_tpa));
- sa.sa_family = AF_UNSPEC;
+ sa.sa_family = pseudo_AF_HDRCMPLT;
sa.sa_len = sizeof(sa);
(*ifp->if_output)(ifp, m, &sa, (struct rtentry *)0);
}
@@ -698,7 +698,7 @@ reply:
bcopy(ea->arp_tha, eh->ether_dhost, sizeof(eh->ether_dhost));
bcopy(enaddr, eh->ether_shost, sizeof(eh->ether_shost));
eh->ether_type = htons(ETHERTYPE_ARP);
- sa.sa_family = AF_UNSPEC;
+ sa.sa_family = pseudo_AF_HDRCMPLT;
sa.sa_len = sizeof(sa);
(*ac->ac_if.if_output)(&ac->ac_if, m, &sa, (struct rtentry *)0);
return;
@@ -910,7 +910,7 @@ revarprequest(ifp)
sizeof(ea->arp_sha));
bcopy((caddr_t)ac->ac_enaddr, (caddr_t)ea->arp_tha,
sizeof(ea->arp_tha));
- sa.sa_family = AF_UNSPEC;
+ sa.sa_family = pseudo_AF_HDRCMPLT;
sa.sa_len = sizeof(sa);
ifp->if_output(ifp, m, &sa, (struct rtentry *)0);
}