NetBSD-Bugs archive

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

kern/40566: if_srt.c - bad #ifdef structure in source



>Number:         40566
>Category:       kern
>Synopsis:       if_srt.c - bad #ifdef structure in source
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 06 13:00:00 +0000 2009
>Originator:     W. Stukenbrock
>Release:        NetBSD 5_RC (downloaded on 05.02.2008)
>Organization:
Dr. Nagler & Company GmbH
        
>Environment:
        
        
System: NetBSD s012 4.0 NetBSD 4.0 (NSW-S012) #1: Thu Sep 11 12:21:03 CEST 2008 
root@s012:/usr/src/sys/arch/amd64/compile/NSW-S012 amd64
Architecture: x86_64
Machine: amd64
>Description:
        There is an error in the #ifdef structure vor INET and INET6 in 
if_srt.c.
        It will fail to compile, if either INET or INET6 is not defined.
>How-To-Repeat:
        try to compile it with INET not defined in the kernel config
>Fix:
--- if_srt.c.orig       2009-02-06 13:50:12.000000000 +0100
+++ if_srt.c    2009-02-06 13:50:28.000000000 +0100
@@ -189,20 +189,20 @@
   {
 #ifdef INET
     case AF_INET:
-#endif
        { struct ip *ip;
          ip = mtod(m,struct ip *);
          r = find_rt(sc,AF_INET,ip->ip_src);
        }
        break;
+#endif
 #ifdef INET6
     case AF_INET6:
-#endif
        { struct ip6_hdr *ip;
          ip = mtod(m,struct ip6_hdr *);
          r = find_rt(sc,AF_INET6,ip->ip6_src);
        }
        break;
+#endif
     default:
        IF_DROP(&intf->if_snd);
        m_freem(m);

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index