def sanitize(self):
        '''
        Check and optionally fix properties
        '''
        # Let the parent do its stuff
        super(Protocol, self).sanitize()

        # Check if the next header is of the right type, and fix this header
        # if we know better (i.e. the payload is a ProtocolElement so we know
        # the header_type)
        if isinstance(self.payload, Protocol):
            self.next_header = self.payload.header_type
def sanitize ( self ) : super ( Protocol , self ) . sanitize ( ) if isinstance ( self . payload , Protocol ) : self . next_header = self . payload . header_type
Check and optionally fix properties