]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge branch 'master' into mrtdump
authorPavel Tvrdík <pawel.tvrdik@gmail.cz>
Tue, 28 Jul 2015 15:31:44 +0000 (17:31 +0200)
committerPavel Tvrdík <pawel.tvrdik@gmail.cz>
Tue, 28 Jul 2015 15:31:44 +0000 (17:31 +0200)
1  2 
doc/bird.sgml
lib/birdlib.h
nest/config.Y
nest/route.h
nest/rt-table.c
proto/bgp/bgp.c
proto/bgp/bgp.h
proto/bgp/packets.c
proto/ospf/rt.c
tools/Makefile.in
tools/Rules.in

diff --cc doc/bird.sgml
Simple merge
diff --cc lib/birdlib.h
Simple merge
diff --cc nest/config.Y
Simple merge
diff --cc nest/route.h
Simple merge
diff --cc nest/rt-table.c
Simple merge
diff --cc proto/bgp/bgp.c
Simple merge
diff --cc proto/bgp/bgp.h
index b40ee9b9123ccaecfa0c2de10fb6fa4b238593bd,274794f136c8e2e208911165a59b531ba0acceea..f64d8a15ae491ccbab3ec94e3439da9432fdea34
@@@ -181,11 -183,16 +184,17 @@@ struct bgp_bucket 
  #define BGP_PORT              179
  #define BGP_VERSION           4
  #define BGP_HEADER_LENGTH     19
- #define BGP_MAX_PACKET_LENGTH 4096
+ #define BGP_MAX_MESSAGE_LENGTH        4096
+ #define BGP_MAX_EXT_MSG_LENGTH        65535
  #define BGP_RX_BUFFER_SIZE    4096
- #define BGP_TX_BUFFER_SIZE    BGP_MAX_PACKET_LENGTH
+ #define BGP_TX_BUFFER_SIZE    4096
+ #define BGP_RX_BUFFER_EXT_SIZE        65535
+ #define BGP_TX_BUFFER_EXT_SIZE        65535
 +#define BGP_ATTR_BUFFER_SIZE  2048    /* Default buffer size for encoded bgp attributes */
  
+ static inline int bgp_max_packet_length(struct bgp_proto *p)
+ { return p->ext_messages ? BGP_MAX_EXT_MSG_LENGTH : BGP_MAX_MESSAGE_LENGTH; }
  extern struct linpool *bgp_linpool;
  
  
index 74fb637c4406323646a8e0b286d66b3e5478c3df,ed99f6236d7fe3777f8d13c1469b9b47f7a47be4..a117895c9b40d7de0012a15e6025e5ce0c1429d4
@@@ -84,8 -84,8 +84,9 @@@ mrt_put_bgp4_hdr(byte *buf, struct bgp_
  static void
  mrt_dump_bgp_packet(struct bgp_conn *conn, byte *pkt, unsigned len)
  {
-   byte buf[BGP_MAX_PACKET_LENGTH + 128];
+   byte *buf = alloca(128+len);        /* 128 is enough for MRT headers */
 -  byte *bp = buf + MRTDUMP_HDR_LENGTH;
 +  byte *bp = buf + MRT_HDR_LENGTH;
++
    int as4 = conn->bgp->as4_session;
  
    bp = mrt_put_bgp4_hdr(bp, conn, as4);
diff --cc proto/ospf/rt.c
Simple merge
Simple merge
diff --cc tools/Rules.in
Simple merge