Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 186589 | Differences between
and this patch

Collapse All | Expand All

(-)arp.c (-4 / +7 lines)
Lines 190-206 Link Here
190
				continue;
190
				continue;
191
			if (reply->ar_pln != sizeof (struct in_addr))
191
			if (reply->ar_pln != sizeof (struct in_addr))
192
				continue;
192
				continue;
193
194
			if (reply->ar_hln != ETHER_ADDR_LEN)
195
				continue;
196
			if ((unsigned) bytes < sizeof (reply) + 
193
			if ((unsigned) bytes < sizeof (reply) + 
197
				2 * (4 + reply->ar_hln))
194
				2 * (4 + reply->ar_hln))
198
				continue;
195
				continue;
199
196
197
			/* Some systems send a reply back from our hwaddress - weird */
198
			if (memcmp (rh.c, iface->hwaddr,
199
						MAX (reply->ar_hln, iface->hwlen)))
200
				continue;
201
200
			rp.c = (unsigned char *) ar_spa (reply);
202
			rp.c = (unsigned char *) ar_spa (reply);
201
			rh.c = (unsigned char *) ar_sha (reply);
203
			rh.c = (unsigned char *) ar_sha (reply);
202
			logger (LOG_ERR, "ARPOP_REPLY received from %s (%s)",
204
			logger (LOG_ERR, "ARPOP_REPLY received from %s (%s)",
203
					inet_ntoa (*rp.a), ether_ntoa (rh.a));
205
					inet_ntoa (*rp.a),
206
					hwaddr_ntoa (rh.c, reply->ar_hln));
204
			retval = -1;
207
			retval = -1;
205
			goto eexit;
208
			goto eexit;
206
		}
209
		}

Return to bug 186589