Fix a bug in parameters length setting.
authorBenjamin Cama <benoar@dolka.fr>
Mon, 25 Jul 2011 10:12:53 +0000 (12:12 +0200)
committerBenjamin Cama <benoar@dolka.fr>
Thu, 28 Jul 2011 13:01:58 +0000 (15:01 +0200)
Signed-off-by: Benjamin Cama <benoar@dolka.fr>
bgp.c

diff --git a/bgp.c b/bgp.c
index e2939d2..7ac4c12 100644 (file)
--- a/bgp.c
+++ b/bgp.c
@@ -1714,7 +1714,7 @@ static int bgp_send_update6(struct bgp_peer *peer)
 
     /* go back and insert attr_len */
     attr_len = htons(len - 4);
-    memcpy(&peer->outbuf->packet.data + 2, &attr_len, sizeof(attr_len));
+    memcpy((char *)&peer->outbuf->packet.data + 2, &attr_len, sizeof(attr_len));
 
     peer->outbuf->packet.header.len = htons(len);
     peer->outbuf->done = 0;