Date: Mon, 16 Feb 2009 16:06:54 GMT From: Andre Oppermann <andre@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 157794 for review Message-ID: <200902161606.n1GG6sWk054578@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=157794 Change 157794 by andre@andre_flirtbox on 2009/02/16 16:06:03 Do not insert our outgoing interface address when forwarding and the source IP is 0.0.0.0. Affected files ... .. //depot/projects/tcp_new/netinet/ip_output.c#3 edit Differences ... ==== //depot/projects/tcp_new/netinet/ip_output.c#3 (text+ko) ==== @@ -362,13 +362,15 @@ /* * If the source address is not specified yet, use the address - * of the outoing interface. + * of the outoing interface. Packet with an unspecified source + * address may be not be forwarded. */ if (ip->ip_src.s_addr == INADDR_ANY) { - /* Interface may have no addresses. */ - if (ia != NULL) { + /* XXX: Interface may have no addresses. */ + if (ia != NULL && !(flags & IP_FORWARDING)) ip->ip_src = IA_SIN(ia)->sin_addr; - } + else + goto bad; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902161606.n1GG6sWk054578>