Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: syssrc/sys/netinet



Jun-ichiro itojun Hagino <itojun%netbsd.org@localhost> writes:

> Modified Files:
>       syssrc/sys/netinet: tcp_input.c
> 
> Log Message:
> make sure we don't touch "ip" in IPv6 path
> 
> To generate a diff of this commit:
> cvs rdiff -r1.137 -r1.138 syssrc/sys/netinet/tcp_input.c

I don't think this is a right fix.  Since all jumps before the first
destaddr check are either the `return' or `goto drop', the second
check (which is added in rev. 1.137) shouldn't be necessary.  I
propose following change instead.  Note that FreeBSD's tcp_input() has
some paths to the label `dropwithreset:' before the first check.

enami.

Index: tcp_input.c
===================================================================
RCS file: /cvsroot/syssrc/sys/netinet/tcp_input.c,v
retrieving revision 1.138
diff -u -r1.138 tcp_input.c
--- tcp_input.c 2002/03/22 03:21:13     1.138
+++ tcp_input.c 2002/03/22 04:07:56
@@ -2250,11 +2250,6 @@
        if (tiflags & TH_RST)
                goto drop;
 
-       if (af == AF_INET &&
-           (IN_MULTICAST(ip->ip_dst.s_addr) ||
-            in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)))
-               goto drop;
-
     {
        /*
         * need to recover version # field, which was overwritten on



Home | Main Index | Thread Index | Old Index