PERFORCE change 39091 for review
Sam Leffler
sam at FreeBSD.org
Fri Oct 3 09:34:30 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=39091
Change 39091 by sam at sam_ebb on 2003/10/03 09:33:31
remove use of static struct sockaddr in arplookup (kern/28417
from bms at spc.org)
Affected files ...
.. //depot/projects/netperf/sys/netinet/if_ether.c#10 edit
Differences ...
==== //depot/projects/netperf/sys/netinet/if_ether.c#10 (text+ko) ====
@@ -912,11 +912,15 @@
int create, proxy;
{
register struct rtentry *rt;
- static struct sockaddr_inarp sin = {sizeof(sin), AF_INET };
+ struct sockaddr_inarp sin;
const char *why = 0;
+ bzero(&sin, sizeof(sin));
+ sin.sin_len = sizeof(sin);
+ sin.sin_family = AF_INET;
sin.sin_addr.s_addr = addr;
- sin.sin_other = proxy ? SIN_PROXY : 0;
+ if (proxy)
+ sin.sin_other = SIN_PROXY;
rt = rtalloc1((struct sockaddr *)&sin, create, 0UL);
if (rt == 0)
return (0);
More information about the p4-projects
mailing list