From owner-p4-projects@FreeBSD.ORG Thu Jun 29 08:26:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9077216A415; Thu, 29 Jun 2006 08:26:26 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5339C16A410 for ; Thu, 29 Jun 2006 08:26:26 +0000 (UTC) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A5A843D79 for ; Thu, 29 Jun 2006 08:26:24 +0000 (GMT) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5T8QOpE024665 for ; Thu, 29 Jun 2006 08:26:24 GMT (envelope-from clem1@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5T8QOLw024662 for perforce@freebsd.org; Thu, 29 Jun 2006 08:26:24 GMT (envelope-from clem1@FreeBSD.org) Date: Thu, 29 Jun 2006 08:26:24 GMT Message-Id: <200606290826.k5T8QOLw024662@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to clem1@FreeBSD.org using -f From: Clément Lecigne To: Perforce Change Reviews Cc: Subject: PERFORCE change 100273 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 08:26:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=100273 Change 100273 by clem1@clem1_ipv6vulns on 2006/06/29 08:26:23 pcs ipv6 packet manipulation improvements and bug fix. Affected files ... .. //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/packets/ipv6.py#4 edit Differences ... ==== //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/packets/ipv6.py#4 (text+ko) ==== @@ -41,9 +41,12 @@ from socket import AF_INET6, inet_ntop # extension header next header field. +IPV6_HOPOPTS = 0 +IPV6_RTHDR = 43 IPV6_FRAG = 44 -IPV6_HOPOPTS = 49 -IPV6_RTHDR = 43 +IPV6_ESP = 50 +IPV6_AH = 51 +IPV6_NONE = 59 IPV6_DSTOPTS = 60 class ipv6(pcs.Packet): @@ -74,7 +77,7 @@ value = inet_ntop(AF_INET6, self.__dict__[field.name]) retval += "%s %s\n" % (field.name, value) else: - retval += "%s %s\n" % (field.name, self.__dict__[field.name]) + retval += "%s %d\n" % (field.name, self.__dict__[field.name]) return retval def getipv6(self, iface): @@ -131,6 +134,7 @@ def option(self, len = 0): """add option header to the hop-by-hop extension header""" + # XXX: pad0 option has not this header. global op op += 1 otype = pcs.Field("otype" + str(op), 8) @@ -157,10 +161,11 @@ len = pcs.Field("length", 8) type = pcs.Field("type", 8) pcs.Packet.__init__(self, - [next, len, type, segments_left], bytes) + [next, len, type], bytes) def option(self, len = 0): """add option header to the destination extension header""" + # XXX: pad0 option has not this header. global op op += 1 otype = pcs.Field("otype" + str(op), 8) @@ -186,4 +191,3 @@ identification = pcs.Field("identification", 32) pcs.Packet.__init__(self, [next, reserved, offset, res, m, identification], bytes) -