* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ipv6cp.c,v 1.17 2002/12/04 23:03:32 paulus Exp $
+ * $Id: ipv6cp.c,v 1.19 2004/01/13 03:59:37 paulus Exp $
*/
-#define RCSID "$Id: ipv6cp.c,v 1.17 2002/12/04 23:03:32 paulus Exp $"
+#define RCSID "$Id: ipv6cp.c,v 1.19 2004/01/13 03:59:37 paulus Exp $"
/*
* TODO:
* If they want to negotiate about interface identifier, we comply.
* If they want us to ask for compression, we refuse.
*/
- while (len > CILEN_VOID) {
+ while (len >= CILEN_VOID) {
GETCHAR(citype, p);
GETCHAR(cilen, p);
- if( (len -= cilen) < 0 )
+ if ( cilen < CILEN_VOID || (len -= cilen) < 0 )
goto bad;
next = p + cilen - 2;
*/
#define IP6_HDRLEN 40 /* bytes */
#define IP6_NHDR_FRAG 44 /* fragment IPv6 header */
-#define IPPROTO_TCP 6
#define TCP_HDRLEN 20
#define TH_FIN 0x01