Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.236.2.1 retrieving revision 1.238 diff -u -p -r1.236.2.1 -r1.238 --- src/sys/netinet/ip_input.c 2007/09/16 15:34:59 1.236.2.1 +++ src/sys/netinet/ip_input.c 2006/12/06 00:39:56 1.238 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.236.2.1 2007/09/16 15:34:59 xtraeme Exp $ */ +/* $NetBSD: ip_input.c,v 1.238 2006/12/06 00:39:56 dyoung Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.236.2.1 2007/09/16 15:34:59 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.238 2006/12/06 00:39:56 dyoung Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -1013,6 +1013,7 @@ found: /* XXX error stat??? */ error = EINVAL; DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/ + goto bad; } splx(s); if (error) @@ -1727,10 +1728,10 @@ ip_srcroute(void) struct mbuf *m; if (ip_nhops == 0) - return ((struct mbuf *)0); + return NULL; m = m_get(M_DONTWAIT, MT_SOOPTS); if (m == 0) - return ((struct mbuf *)0); + return NULL; MCLAIM(m, &inetdomain.dom_mowner); #define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt)) @@ -1934,7 +1935,7 @@ ip_forward(struct mbuf *m, int srcrt) } } - error = ip_output(m, (struct mbuf *)0, &ipforward_rt, + error = ip_output(m, NULL, &ipforward_rt, (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)), (struct ip_moptions *)NULL, (struct socket *)NULL); @@ -1977,7 +1978,7 @@ ip_forward(struct mbuf *m, int srcrt) type = ICMP_UNREACH; code = ICMP_UNREACH_NEEDFRAG; #if !defined(IPSEC) && !defined(FAST_IPSEC) - if (ipforward_rt.ro_rt) + if (ipforward_rt.ro_rt != NULL) destmtu = ipforward_rt.ro_rt->rt_ifp->if_mtu; #else /* @@ -1986,7 +1987,7 @@ ip_forward(struct mbuf *m, int srcrt) * tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz * XXX quickhack!!! */ - if (ipforward_rt.ro_rt) { + if (ipforward_rt.ro_rt != NULL) { struct secpolicy *sp; int ipsecerror; size_t ipsechdr;