Page MenuHomeFreeBSD

D31327.diff
No OneTemporary

D31327.diff

diff --git a/sys/net/debugnet_inet.c b/sys/net/debugnet_inet.c
--- a/sys/net/debugnet_inet.c
+++ b/sys/net/debugnet_inet.c
@@ -86,6 +86,9 @@
struct mbuf *m;
unsigned short hlen;
+ if (pcb->dp_state < DN_STATE_HAVE_GW_MAC)
+ return;
+
/* IP processing. */
m = *mb;
if (m->m_pkthdr.len < sizeof(struct ip)) {
@@ -347,13 +350,19 @@
" server or gateway)\n", buf);
return;
}
+ if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) {
+ inet_ntoa_r(isaddr, buf);
+ DNETDEBUG("ignoring server ARP reply from %s (already"
+ " have gateway address)\n", buf);
+ return;
+ }
+ MPASS(pcb->dp_state == DN_STATE_INIT);
memcpy(pcb->dp_gw_mac.octet, ar_sha(ah),
min(ah->ar_hln, ETHER_ADDR_LEN));
DNETDEBUG("got server MAC address %6D\n",
pcb->dp_gw_mac.octet, ":");
- MPASS(pcb->dp_state == DN_STATE_INIT);
pcb->dp_state = DN_STATE_HAVE_GW_MAC;
return;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Aug 29, 1:52 AM (13 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37491401
Default Alt Text
D31327.diff (906 B)

Event Timeline