--- dpkt/bgp.py +++ dpkt/bgp.py @@ -140,7 +140,7 @@ class Open(dpkt.Packet): __hdr__ = ( ('v', 'B', 4), - ('as', 'H', 0), + ('as_', 'H', 0), ('holdtime', 'H', 0), ('identifier', 'I', 0), ('param_len', 'B', 0) @@ -401,7 +401,7 @@ class Aggregator(dpkt.Packet): __hdr__ = ( - ('as', 'H', 0), + ('as_', 'H', 0), ('ip', 'I', 0) ) @@ -428,7 +428,7 @@ class Community(dpkt.Packet): __hdr__ = ( - ('as', 'H', 0), + ('as_', 'H', 0), ('value', 'H', 0) ) @@ -675,7 +675,7 @@ self.failUnless(a.len == 12) self.failUnless(len(a.communities.list) == 3) c = a.communities.list[0] - self.failUnless(c.as == 65215) + self.failUnless(c.as_ == 65215) self.failUnless(c.value == 1) r = b2.update.announced[0] self.failUnless(r.len == 22) @@ -712,7 +712,7 @@ b4 = BGP(self.bgp4) self.failUnless(b4.len == 45) self.failUnless(b4.type == OPEN) - self.failUnless(b4.open.as == 237) + self.failUnless(b4.open.as_ == 237) self.failUnless(b4.open.param_len == 16) self.failUnless(len(b4.open.parameters) == 3) p = b4.open.parameters[0]