diff --git a/scapy/contrib/bgp.py b/scapy/contrib/bgp.py
index 5d2b87e772ef067af4fa983e72c33735385b3d2d..290ef6372307720e32493a08a111a86ffe2235f5 100644
--- a/scapy/contrib/bgp.py
+++ b/scapy/contrib/bgp.py
@@ -400,6 +400,14 @@ class BGPHeader(Packet):
         ByteEnumField("type", 4, _bgp_message_types)
     ]
 
+    @classmethod
+    def dispatch_hook(cls, _pkt=None, *args, **kargs):
+        """
+        Returns the right class for the given data.
+        """
+
+        return _bgp_dispatcher(_pkt)
+
     def post_build(self, p, pay):
         if self.len is None:
             length = len(p)
diff --git a/scapy/contrib/bgp.uts b/scapy/contrib/bgp.uts
index f6be42093a3438072750468abfef1836f8b96dba..a9b54648163505fbbe62454d2b7b044f90a73bca 100644
--- a/scapy/contrib/bgp.uts
+++ b/scapy/contrib/bgp.uts
@@ -85,6 +85,19 @@ h = BGP(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x
 assert(h.type == BGP.OPEN_TYPE)
 assert(h.len == 19)
 
+############################### BGPKeepAlive  #################################
++ BGPKeepAlive class tests
+
+= BGPKeepAlive - Instantiation (by default, should be a "generic" capability)
+raw(BGPKeepAlive())
+raw(BGPKeepAlive()) == b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x13\x04'
+
+= BGPKeepAlive - Swallowing tests: combined BGPKeepAlive
+o = BGPKeepAlive()
+m=IP(src="12.0.0.1",dst="12.0.0.2")/TCP(dport=54321)/BGP(raw(o)*2)
+m.show()
+assert isinstance(m[BGPKeepAlive].payload, BGPKeepAlive)
+assert m[BGPKeepAlive].payload.marker == 0xffffffffffffffffffffffffffffffff
 
 ############################### BGPCapability #################################
 + BGPCapability class tests