[comp.bugs.4bsd.ucb-fixes] ARTICLE #10

bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) (03/23/87)

4.3BSD network bug (#6, in_localaddr)
Index:	sys/netinet/in.c 4.3BSD FIX

Description:
A missing set of parentheses causes large packets to be sent
to non-local destinations.  Default-sized packets should be used
when sending to destinations not on the local network.

Fix:
*** in.c.7.1	Wed Mar  4 23:32:17 1987
--- in.c.7.2	Wed Mar  4 23:31:55 1987
***************
*** 5,7 ****
   *
!  *	@(#)in.c	7.1 (Berkeley) 6/5/86
   */
--- 5,7 ----
   *
!  *	@(#)in.c	7.2 (Berkeley) 11/23/86
   */
***************
*** 157,159 ****
  	for (ia = in_ifaddr; ia; ia = ia->ia_next)
! 		if (net == subnetsarelocal ? ia->ia_net : ia->ia_subnet)
  			return (1);
--- 157,159 ----
  	for (ia = in_ifaddr; ia; ia = ia->ia_next)
! 		if (net == (subnetsarelocal ? ia->ia_net : ia->ia_subnet))
  			return (1);