Mon Sep 24 03:05:53 2012 UTC ()
Add missing "\n" in log(9)


(msaitoh)
diff -r1.63 -r1.64 src/sys/net/if_arcsubr.c
diff -r1.32 -r1.33 src/sys/netinet/if_atm.c
diff -r1.125 -r1.126 src/sys/netinet/ip_mroute.c

cvs diff -r1.63 -r1.64 src/sys/net/if_arcsubr.c (expand / switch to unified diff)

--- src/sys/net/if_arcsubr.c 2010/04/05 07:22:22 1.63
+++ src/sys/net/if_arcsubr.c 2012/09/24 03:05:53 1.64
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_arcsubr.c,v 1.63 2010/04/05 07:22:22 joerg Exp $ */ 1/* $NetBSD: if_arcsubr.c,v 1.64 2012/09/24 03:05:53 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1994, 1995 Ignatios Souvatzis 4 * Copyright (c) 1994, 1995 Ignatios Souvatzis
5 * Copyright (c) 1982, 1989, 1993 5 * Copyright (c) 1982, 1989, 1993
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE. 30 * SUCH DAMAGE.
31 * 31 *
32 * from: NetBSD: if_ethersubr.c,v 1.9 1994/06/29 06:36:11 cgd Exp 32 * from: NetBSD: if_ethersubr.c,v 1.9 1994/06/29 06:36:11 cgd Exp
33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
34 * 34 *
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.63 2010/04/05 07:22:22 joerg Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.64 2012/09/24 03:05:53 msaitoh Exp $");
39 39
40#include "opt_inet.h" 40#include "opt_inet.h"
41 41
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/kernel.h> 45#include <sys/kernel.h>
46#include <sys/malloc.h> 46#include <sys/malloc.h>
47#include <sys/mbuf.h> 47#include <sys/mbuf.h>
48#include <sys/protosw.h> 48#include <sys/protosw.h>
49#include <sys/socket.h> 49#include <sys/socket.h>
50#include <sys/ioctl.h> 50#include <sys/ioctl.h>
51#include <sys/errno.h> 51#include <sys/errno.h>
@@ -623,27 +623,27 @@ arc_sprintf(uint8_t *ap) @@ -623,27 +623,27 @@ arc_sprintf(uint8_t *ap)
623void 623void
624arc_ifattach(struct ifnet *ifp, uint8_t lla) 624arc_ifattach(struct ifnet *ifp, uint8_t lla)
625{ 625{
626 struct arccom *ac; 626 struct arccom *ac;
627 627
628 ifp->if_type = IFT_ARCNET; 628 ifp->if_type = IFT_ARCNET;
629 ifp->if_addrlen = 1; 629 ifp->if_addrlen = 1;
630 ifp->if_hdrlen = ARC_HDRLEN; 630 ifp->if_hdrlen = ARC_HDRLEN;
631 ifp->if_dlt = DLT_ARCNET; 631 ifp->if_dlt = DLT_ARCNET;
632 if (ifp->if_flags & IFF_BROADCAST) 632 if (ifp->if_flags & IFF_BROADCAST)
633 ifp->if_flags |= IFF_MULTICAST|IFF_ALLMULTI; 633 ifp->if_flags |= IFF_MULTICAST|IFF_ALLMULTI;
634 if (ifp->if_flags & IFF_LINK0 && arc_ipmtu > ARC_PHDS_MAXMTU) 634 if (ifp->if_flags & IFF_LINK0 && arc_ipmtu > ARC_PHDS_MAXMTU)
635 log(LOG_ERR, 635 log(LOG_ERR,
636 "%s: arc_ipmtu is %d, but must not exceed %d", 636 "%s: arc_ipmtu is %d, but must not exceed %d\n",
637 ifp->if_xname, arc_ipmtu, ARC_PHDS_MAXMTU); 637 ifp->if_xname, arc_ipmtu, ARC_PHDS_MAXMTU);
638 638
639 ifp->if_output = arc_output; 639 ifp->if_output = arc_output;
640 ifp->if_input = arc_input; 640 ifp->if_input = arc_input;
641 ac = (struct arccom *)ifp; 641 ac = (struct arccom *)ifp;
642 ac->ac_seqid = (time_second) & 0xFFFF; /* try to make seqid unique */ 642 ac->ac_seqid = (time_second) & 0xFFFF; /* try to make seqid unique */
643 if (lla == 0) { 643 if (lla == 0) {
644 /* XXX this message isn't entirely clear, to me -- cgd */ 644 /* XXX this message isn't entirely clear, to me -- cgd */
645 log(LOG_ERR,"%s: link address 0 reserved for broadcasts. Please change it and ifconfig %s down up\n", 645 log(LOG_ERR,"%s: link address 0 reserved for broadcasts. Please change it and ifconfig %s down up\n",
646 ifp->if_xname, ifp->if_xname); 646 ifp->if_xname, ifp->if_xname);
647 } 647 }
648 if_attach(ifp); 648 if_attach(ifp);
649 if_set_sadl(ifp, &lla, sizeof(lla), true); 649 if_set_sadl(ifp, &lla, sizeof(lla), true);

cvs diff -r1.32 -r1.33 src/sys/netinet/Attic/if_atm.c (expand / switch to unified diff)

--- src/sys/netinet/Attic/if_atm.c 2011/02/01 19:43:12 1.32
+++ src/sys/netinet/Attic/if_atm.c 2012/09/24 03:05:53 1.33
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_atm.c,v 1.32 2011/02/01 19:43:12 chuck Exp $ */ 1/* $NetBSD: if_atm.c,v 1.33 2012/09/24 03:05:53 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 Charles D. Cranor and Washington University. 4 * Copyright (c) 1996 Charles D. Cranor and Washington University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28/* 28/*
29 * IP <=> ATM address resolution. 29 * IP <=> ATM address resolution.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.32 2011/02/01 19:43:12 chuck Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.33 2012/09/24 03:05:53 msaitoh Exp $");
34 34
35#include "opt_inet.h" 35#include "opt_inet.h"
36#include "opt_natm.h" 36#include "opt_natm.h"
37 37
38#if defined(INET) || defined(INET6) 38#if defined(INET) || defined(INET6)
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/malloc.h> 42#include <sys/malloc.h>
43#include <sys/mbuf.h> 43#include <sys/mbuf.h>
44#include <sys/socket.h> 44#include <sys/socket.h>
45#include <sys/time.h> 45#include <sys/time.h>
46#include <sys/kernel.h> 46#include <sys/kernel.h>
@@ -115,27 +115,27 @@ atm_rtrequest(int req, struct rtentry *r @@ -115,27 +115,27 @@ atm_rtrequest(int req, struct rtentry *r
115 ifp->if_index, ifp->if_type, 115 ifp->if_index, ifp->if_type,
116 NULL, namelen, NULL, addrlen); 116 NULL, namelen, NULL, addrlen);
117 rt_setgate(rt, &u.sa); 117 rt_setgate(rt, &u.sa);
118 gate = rt->rt_gateway; 118 gate = rt->rt_gateway;
119 break; 119 break;
120 } 120 }
121 121
122 if ((rt->rt_flags & RTF_CLONING) != 0) { 122 if ((rt->rt_flags & RTF_CLONING) != 0) {
123 printf("atm_rtrequest: cloning route detected?\n"); 123 printf("atm_rtrequest: cloning route detected?\n");
124 break; 124 break;
125 } 125 }
126 if (gate->sa_family != AF_LINK || 126 if (gate->sa_family != AF_LINK ||
127 gate->sa_len < sockaddr_dl_measure(namelen, addrlen)) { 127 gate->sa_len < sockaddr_dl_measure(namelen, addrlen)) {
128 log(LOG_DEBUG, "atm_rtrequest: bad gateway value"); 128 log(LOG_DEBUG, "atm_rtrequest: bad gateway value\n");
129 break; 129 break;
130 } 130 }
131 131
132#ifdef DIAGNOSTIC 132#ifdef DIAGNOSTIC
133 if (rt->rt_ifp->if_ioctl == NULL) panic("atm null ioctl"); 133 if (rt->rt_ifp->if_ioctl == NULL) panic("atm null ioctl");
134#endif 134#endif
135 135
136#ifdef NATM 136#ifdef NATM
137 /* 137 /*
138 * let native ATM know we are using this VCI/VPI 138 * let native ATM know we are using this VCI/VPI
139 * (i.e. reserve it) 139 * (i.e. reserve it)
140 */ 140 */
141 sin = satocsin(rt_getkey(rt)); 141 sin = satocsin(rt_getkey(rt));
@@ -218,27 +218,27 @@ failed: @@ -218,27 +218,27 @@ failed:
218 * 1 == resolve OK; desten contains result 218 * 1 == resolve OK; desten contains result
219 * 219 *
220 * XXX: will need more work if we wish to support ATMARP in the kernel, 220 * XXX: will need more work if we wish to support ATMARP in the kernel,
221 * but this is enough for PVCs entered via the "route" command. 221 * but this is enough for PVCs entered via the "route" command.
222 */ 222 */
223 223
224int 224int
225atmresolve(struct rtentry *rt, struct mbuf *m, const struct sockaddr *dst, 225atmresolve(struct rtentry *rt, struct mbuf *m, const struct sockaddr *dst,
226 struct atm_pseudohdr *desten /* OUT */) 226 struct atm_pseudohdr *desten /* OUT */)
227{ 227{
228 const struct sockaddr_dl *sdl; 228 const struct sockaddr_dl *sdl;
229 229
230 if (m->m_flags & (M_BCAST|M_MCAST)) { 230 if (m->m_flags & (M_BCAST|M_MCAST)) {
231 log(LOG_INFO, "atmresolve: BCAST/MCAST packet detected/dumped"); 231 log(LOG_INFO, "atmresolve: BCAST/MCAST packet detected/dumped\n");
232 goto bad; 232 goto bad;
233 } 233 }
234 234
235 if (rt == NULL) { 235 if (rt == NULL) {
236 rt = RTALLOC1(dst, 0); 236 rt = RTALLOC1(dst, 0);
237 if (rt == NULL) goto bad; /* failed */ 237 if (rt == NULL) goto bad; /* failed */
238 rt->rt_refcnt--; /* don't keep LL references */ 238 rt->rt_refcnt--; /* don't keep LL references */
239 if ((rt->rt_flags & RTF_GATEWAY) != 0 || 239 if ((rt->rt_flags & RTF_GATEWAY) != 0 ||
240 (rt->rt_flags & RTF_LLINFO) == 0 || 240 (rt->rt_flags & RTF_LLINFO) == 0 ||
241 /* XXX: are we using LLINFO? */ 241 /* XXX: are we using LLINFO? */
242 rt->rt_gateway->sa_family != AF_LINK) { 242 rt->rt_gateway->sa_family != AF_LINK) {
243 goto bad; 243 goto bad;
244 } 244 }

cvs diff -r1.125 -r1.126 src/sys/netinet/ip_mroute.c (expand / switch to unified diff)

--- src/sys/netinet/ip_mroute.c 2012/05/01 15:09:36 1.125
+++ src/sys/netinet/ip_mroute.c 2012/09/24 03:05:53 1.126
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ip_mroute.c,v 1.125 2012/05/01 15:09:36 martin Exp $ */ 1/* $NetBSD: ip_mroute.c,v 1.126 2012/09/24 03:05:53 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Stephen Deering of Stanford University. 8 * Stephen Deering of Stanford University.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -83,27 +83,27 @@ @@ -83,27 +83,27 @@
83 * Modified by Charles M. Hannum, NetBSD, May 1995. 83 * Modified by Charles M. Hannum, NetBSD, May 1995.
84 * Modified by Ahmed Helmy, SGI, June 1996 84 * Modified by Ahmed Helmy, SGI, June 1996
85 * Modified by George Edmond Eddy (Rusty), ISI, February 1998 85 * Modified by George Edmond Eddy (Rusty), ISI, February 1998
86 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000 86 * Modified by Pavlin Radoslavov, USC/ISI, May 1998, August 1999, October 2000
87 * Modified by Hitoshi Asaeda, WIDE, August 2000 87 * Modified by Hitoshi Asaeda, WIDE, August 2000
88 * Modified by Pavlin Radoslavov, ICSI, October 2002 88 * Modified by Pavlin Radoslavov, ICSI, October 2002
89 * 89 *
90 * MROUTING Revision: 1.2 90 * MROUTING Revision: 1.2
91 * and PIM-SMv2 and PIM-DM support, advanced API support, 91 * and PIM-SMv2 and PIM-DM support, advanced API support,
92 * bandwidth metering and signaling 92 * bandwidth metering and signaling
93 */ 93 */
94 94
95#include <sys/cdefs.h> 95#include <sys/cdefs.h>
96__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.125 2012/05/01 15:09:36 martin Exp $"); 96__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.126 2012/09/24 03:05:53 msaitoh Exp $");
97 97
98#include "opt_inet.h" 98#include "opt_inet.h"
99#include "opt_ipsec.h" 99#include "opt_ipsec.h"
100#include "opt_pim.h" 100#include "opt_pim.h"
101 101
102#ifdef PIM 102#ifdef PIM
103#define _PIM_VT 1 103#define _PIM_VT 1
104#endif 104#endif
105 105
106#include <sys/param.h> 106#include <sys/param.h>
107#include <sys/systm.h> 107#include <sys/systm.h>
108#include <sys/callout.h> 108#include <sys/callout.h>
109#include <sys/mbuf.h> 109#include <sys/mbuf.h>
@@ -3013,27 +3013,27 @@ expire_bw_meter_process(void *unused) @@ -3013,27 +3013,27 @@ expire_bw_meter_process(void *unused)
3013 */ 3013 */
3014 3014
3015#ifdef PIM 3015#ifdef PIM
3016/* 3016/*
3017 * Send the packet up to the user daemon, or eventually do kernel encapsulation 3017 * Send the packet up to the user daemon, or eventually do kernel encapsulation
3018 */ 3018 */
3019static int 3019static int
3020pim_register_send(struct ip *ip, struct vif *vifp, 3020pim_register_send(struct ip *ip, struct vif *vifp,
3021 struct mbuf *m, struct mfc *rt) 3021 struct mbuf *m, struct mfc *rt)
3022{ 3022{
3023 struct mbuf *mb_copy, *mm; 3023 struct mbuf *mb_copy, *mm;
3024 3024
3025 if (mrtdebug & DEBUG_PIM) 3025 if (mrtdebug & DEBUG_PIM)
3026 log(LOG_DEBUG, "pim_register_send: "); 3026 log(LOG_DEBUG, "pim_register_send: \n");
3027 3027
3028 mb_copy = pim_register_prepare(ip, m); 3028 mb_copy = pim_register_prepare(ip, m);
3029 if (mb_copy == NULL) 3029 if (mb_copy == NULL)
3030 return ENOBUFS; 3030 return ENOBUFS;
3031 3031
3032 /* 3032 /*
3033 * Send all the fragments. Note that the mbuf for each fragment 3033 * Send all the fragments. Note that the mbuf for each fragment
3034 * is freed by the sending machinery. 3034 * is freed by the sending machinery.
3035 */ 3035 */
3036 for (mm = mb_copy; mm; mm = mb_copy) { 3036 for (mm = mb_copy; mm; mm = mb_copy) {
3037 mb_copy = mm->m_nextpkt; 3037 mb_copy = mm->m_nextpkt;
3038 mm->m_nextpkt = NULL; 3038 mm->m_nextpkt = NULL;
3039 mm = m_pullup(mm, sizeof(struct ip)); 3039 mm = m_pullup(mm, sizeof(struct ip));
@@ -3133,27 +3133,27 @@ pim_register_send_upcall(struct ip *ip,  @@ -3133,27 +3133,27 @@ pim_register_send_upcall(struct ip *ip,
3133 im->im_msgtype = IGMPMSG_WHOLEPKT; 3133 im->im_msgtype = IGMPMSG_WHOLEPKT;
3134 im->im_mbz = 0; 3134 im->im_mbz = 0;
3135 im->im_vif = vifp - viftable; 3135 im->im_vif = vifp - viftable;
3136 im->im_src = ip->ip_src; 3136 im->im_src = ip->ip_src;
3137 im->im_dst = ip->ip_dst; 3137 im->im_dst = ip->ip_dst;
3138 3138
3139 k_igmpsrc.sin_addr = ip->ip_src; 3139 k_igmpsrc.sin_addr = ip->ip_src;
3140 3140
3141 mrtstat.mrts_upcalls++; 3141 mrtstat.mrts_upcalls++;
3142 3142
3143 if (socket_send(ip_mrouter, mb_first, &k_igmpsrc) < 0) { 3143 if (socket_send(ip_mrouter, mb_first, &k_igmpsrc) < 0) {
3144 if (mrtdebug & DEBUG_PIM) 3144 if (mrtdebug & DEBUG_PIM)
3145 log(LOG_WARNING, 3145 log(LOG_WARNING,
3146 "mcast: pim_register_send_upcall: ip_mrouter socket queue full"); 3146 "mcast: pim_register_send_upcall: ip_mrouter socket queue full\n");
3147 ++mrtstat.mrts_upq_sockfull; 3147 ++mrtstat.mrts_upq_sockfull;
3148 return ENOBUFS; 3148 return ENOBUFS;
3149 } 3149 }
3150 3150
3151 /* Keep statistics */ 3151 /* Keep statistics */
3152 pimstat.pims_snd_registers_msgs++; 3152 pimstat.pims_snd_registers_msgs++;
3153 pimstat.pims_snd_registers_bytes += len; 3153 pimstat.pims_snd_registers_bytes += len;
3154 3154
3155 return 0; 3155 return 0;
3156} 3156}
3157 3157
3158/* 3158/*
3159 * Encapsulate the data packet in PIM Register message and send it to the RP. 3159 * Encapsulate the data packet in PIM Register message and send it to the RP.
@@ -3301,27 +3301,27 @@ pim_input(struct mbuf *m, ...) @@ -3301,27 +3301,27 @@ pim_input(struct mbuf *m, ...)
3301 3301
3302 /* 3302 /*
3303 * Validate checksum. If PIM REGISTER, exclude the data packet. 3303 * Validate checksum. If PIM REGISTER, exclude the data packet.
3304 * 3304 *
3305 * XXX: some older PIMv2 implementations don't make this distinction, 3305 * XXX: some older PIMv2 implementations don't make this distinction,
3306 * so for compatibility reason perform the checksum over part of the 3306 * so for compatibility reason perform the checksum over part of the
3307 * message, and if error, then over the whole message. 3307 * message, and if error, then over the whole message.
3308 */ 3308 */
3309 if (PIM_VT_T(pim->pim_vt) == PIM_REGISTER && in_cksum(m, PIM_MINLEN) == 0) { 3309 if (PIM_VT_T(pim->pim_vt) == PIM_REGISTER && in_cksum(m, PIM_MINLEN) == 0) {
3310 /* do nothing, checksum okay */ 3310 /* do nothing, checksum okay */
3311 } else if (in_cksum(m, datalen)) { 3311 } else if (in_cksum(m, datalen)) {
3312 pimstat.pims_rcv_badsum++; 3312 pimstat.pims_rcv_badsum++;
3313 if (mrtdebug & DEBUG_PIM) 3313 if (mrtdebug & DEBUG_PIM)
3314 log(LOG_DEBUG, "pim_input: invalid checksum"); 3314 log(LOG_DEBUG, "pim_input: invalid checksum\n");
3315 m_freem(m); 3315 m_freem(m);
3316 return; 3316 return;
3317 } 3317 }
3318 3318
3319 /* PIM version check */ 3319 /* PIM version check */
3320 if (PIM_VT_V(pim->pim_vt) < PIM_VERSION) { 3320 if (PIM_VT_V(pim->pim_vt) < PIM_VERSION) {
3321 pimstat.pims_rcv_badversion++; 3321 pimstat.pims_rcv_badversion++;
3322 log(LOG_ERR, "pim_input: incorrect version %d, expecting %d\n", 3322 log(LOG_ERR, "pim_input: incorrect version %d, expecting %d\n",
3323 PIM_VT_V(pim->pim_vt), PIM_VERSION); 3323 PIM_VT_V(pim->pim_vt), PIM_VERSION);
3324 m_freem(m); 3324 m_freem(m);
3325 return; 3325 return;
3326 } 3326 }
3327 3327