From owner-freebsd-net Thu Mar 7 10:59: 7 2002 Delivered-To: freebsd-net@freebsd.org Received: from smtp011.mail.yahoo.com (smtp011.mail.yahoo.com [216.136.173.31]) by hub.freebsd.org (Postfix) with SMTP id B1F4237B400 for ; Thu, 7 Mar 2002 10:59:02 -0800 (PST) Received: from kshitijgunjikar (AUTH poptime) at unknown (HELO kshitij) (203.124.128.243) by smtp.mail.vip.sc5.yahoo.com with SMTP; 7 Mar 2002 09:55:01 -0000 From: "Kshitij Gunjikar" To: Subject: icmp related question Date: Thu, 7 Mar 2002 15:35:05 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi All, Hi I'm studying code for ICMP . there is a piece of code in icmp_input which just returns when we find the ICMP packet length lesser than allowed. if (icmplen < ICMP_MINLEN) { icmpstat.icps_tooshort++; goto freeit; } i = hlen + min(icmplen, ICMP_ADVLENMIN); if (m->m_len < i && (m = m_pullup(m, i)) == 0) { icmpstat.icps_tooshort++; return; } where #define ICMPADVELMIN (8 + sizeof(struct ip) + 8) and icmplen = ip->ip_len ; why the return? Shouldn't there be a freeing of the msg.i.e call the m_freem(m) instead of return ? Can anybody please shed light on this ? Thanks. Regards Kshitij _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message