Skip to content

Commit

Permalink
udp: Don't update ARP cache on receipt of broadcast/multicast UDP dat…
Browse files Browse the repository at this point in the history
…agrams. [DC-319]

This can result in unnecessary churn of our ARP table on networks with lots of broadcast/multicast traffic.
  • Loading branch information
tomlogic committed Jun 6, 2017
1 parent fb2c463 commit 2fc3a52
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Lib/Rabbit4000/tcpip/udp.lib
Expand Up @@ -771,20 +771,21 @@ _udp_nodebug ll_prefix __far * udp_handler(ll_prefix __far * LL, byte * hdrbuf)

LOCK_SOCK(s);

// Cache the hardware address, since we probably want to respond
//ath = arpcache_new(source, udp_datagram_info.hwa, iface);
//Vantive 23956: now use ARP lookup instead of sending back to source's MAC address.
ath = arpresolve_start_iface(source, iface);
if (ath > 0 && (ath = arpresolve_check(ath, source)) > 0) {
if(! (udp_datagram_info.flags & (UDI_BROADCAST_IP | UDI_MULTICAST_IP))) {
// Cache the hardware address, since we probably want to respond
// to unicast (but not necessarily broadcast or multicast) UDP datagrams.
ath = arpresolve_start_iface(source, iface);
if (ath > 0 && (ath = arpresolve_check(ath, source)) > 0) {
// Router/localhost resolved, use its MAC
#ifdef UDP_VERBOSE
if (debug_on > 0) printf("UDP: ...using ARP table entry\n");
if (debug_on > 0) printf("UDP: ...using ARP table entry\n");
#endif
}

if (ath > 0)
s->sath = ath;
}

if (ath > 0)
s->sath = ath;
}

/* process user data */
dp = LL->payload;

Expand Down

0 comments on commit 2fc3a52

Please sign in to comment.