Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet When sending an ARP reply, make sure to set the ...
details: https://anonhg.NetBSD.org/src/rev/e233addd0205
branches: trunk
changeset: 473770:e233addd0205
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Jun 18 18:20:50 1999 +0000
description:
When sending an ARP reply, make sure to set the length of the outgoing
packet.
Slightly modified from PR #7809, Zdenek Salvet <salvet%ics.muni.cz@localhost>.
diffstat:
sys/netinet/if_arp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r f54f0be9c048 -r e233addd0205 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Fri Jun 18 18:11:56 1999 +0000
+++ b/sys/netinet/if_arp.c Fri Jun 18 18:20:50 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.61 1999/05/30 00:39:07 bad Exp $ */
+/* $NetBSD: if_arp.c,v 1.62 1999/06/18 18:20:50 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -701,6 +701,8 @@
ah->ar_op = htons(ARPOP_REPLY);
ah->ar_pro = htons(ETHERTYPE_IP); /* let's be sure! */
m->m_flags &= ~(M_BCAST|M_MCAST); /* never reply by broadcast */
+ m->m_len = sizeof(*ah) + (2 * ah->ar_pln) + (2 * ah->ar_hln);
+ m->m_pkthdr.len = m->m_len;
sa.sa_family = AF_ARP;
sa.sa_len = 2;
(*ifp->if_output)(ifp, m, &sa, (struct rtentry *)0);
Home |
Main Index |
Thread Index |
Old Index