SCCS-vsn: sys/netinet/ip_icmp.c 7.8.1.1
- * Copyright (c) 1982, 1986 Regents of the University of California.
+ * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ip_icmp.c 7.10 (Berkeley) %G%
+ * @(#)ip_icmp.c 7.8.1.1 (Berkeley) %G%
if (oip->ip_off &~ (IP_MF|IP_DF))
goto free;
if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT &&
if (oip->ip_off &~ (IP_MF|IP_DF))
goto free;
if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT &&
+ dtom(oip)->m_len >= oiplen + ICMP_MINLEN &&
n->m_len >= oiplen + ICMP_MINLEN &&
!ICMP_INFOTYPE(((struct icmp *)((caddr_t)oip + oiplen))->icmp_type)) {
icmpstat.icps_oldicmp++;
n->m_len >= oiplen + ICMP_MINLEN &&
!ICMP_INFOTYPE(((struct icmp *)((caddr_t)oip + oiplen))->icmp_type)) {
icmpstat.icps_oldicmp++;
bcopy((caddr_t)oip, (caddr_t)nip, oiplen);
nip->ip_len = m->m_len;
nip->ip_hl = sizeof(struct ip) >> 2;
bcopy((caddr_t)oip, (caddr_t)nip, oiplen);
nip->ip_len = m->m_len;
nip->ip_hl = sizeof(struct ip) >> 2;
+ nip->ip_hl = sizeof(struct ip) >> 2;
nip->ip_p = IPPROTO_ICMP;
icmp_reflect(m);
nip->ip_p = IPPROTO_ICMP;
icmp_reflect(m);
int opt, cnt, off;
u_int len;
int opt, cnt, off;
u_int len;
+ register u_char *cp;
+ int opt, cnt, off;
+ u_int len;
+
/*
* Retrieve any source routing from the incoming packet;
* add on any record-route or timestamp options.
/*
* Retrieve any source routing from the incoming packet;
* add on any record-route or timestamp options.