~kris/9p

9hist

2aa11f677fcf14359b7c10f52007f68b121f022a — David du Colombier 28 years ago 280fe23
Plan 9 from Bell Labs 1998-03-18
1 files changed, 11 insertions(+), 0 deletions(-)

M ip/ipifc.c
M ip/ipifc.c => ip/ipifc.c +11 -0
@@ 369,12 369,23 @@ ipifcadd(Ipifc *ifc, char **argv, int argc)
		bcast[i] = (ip[i] & mask[i]) | ~mask[i];
	addselfcache(f, ifc, lifc, bcast, Rbcast);

	/* add old subnet directed broadcast addresses to the self cache */
	for(i = 0; i < IPaddrlen; i++)
		bcast[i] = (ip[i] & mask[i]) & mask[i];
	addselfcache(f, ifc, lifc, bcast, Rbcast);

	/* add network directed broadcast addresses to the self cache */
	memmove(mask, defmask(ip), IPaddrlen);
	for(i = 0; i < IPaddrlen; i++)
		bcast[i] = (ip[i] & mask[i]) | ~mask[i];
	addselfcache(f, ifc, lifc, bcast, Rbcast);

	/* add old network directed broadcast addresses to the self cache */
	memmove(mask, defmask(ip), IPaddrlen);
	for(i = 0; i < IPaddrlen; i++)
		bcast[i] = (ip[i] & mask[i]) & mask[i];
	addselfcache(f, ifc, lifc, bcast, Rbcast);

	addselfcache(f, ifc, lifc, IPv4bcast, Rbcast);

out: