Avoid implicit cast warning.
[l2tpns.git] / bgp.c
diff --git a/bgp.c b/bgp.c
index 9d237c9..2309a9c 100644 (file)
--- a/bgp.c
+++ b/bgp.c
@@ -762,6 +762,8 @@ static int bgp_connect(struct bgp_peer *peer)
 
     LOG(4, 0, 0, "BGP peer %s: state Active\n", inet_ntoa(addr.sin_addr));
 
+    peer->handle_ipv6_routes = 0;
+
     return bgp_send_open(peer);
 }
 
@@ -785,6 +787,8 @@ static int bgp_handle_connect(struct bgp_peer *peer)
 
     LOG(4, 0, 0, "BGP peer %s: state Active\n", peer->name);
 
+    peer->handle_ipv6_routes = 0;
+
     return bgp_send_open(peer);
 }
 
@@ -1033,7 +1037,7 @@ static int bgp_handle_input(struct bgp_peer *peer)
                            capability->code, peer->name);
 
                        bgp_send_notification_full(peer, BGP_ERR_OPEN, BGP_ERR_OPN_UNSUP_CAP,
-                               capability, 2 + capability->len);
+                               (char *)capability, 2 + capability->len);
                        /* we don't terminate, still; we just jump to the next one */
                        continue;
                    }
@@ -1046,11 +1050,12 @@ static int bgp_handle_input(struct bgp_peer *peer)
                            mp_cap->afi, mp_cap->safi, peer->name);
 
                        bgp_send_notification_full(peer, BGP_ERR_OPEN, BGP_ERR_OPN_UNSUP_CAP,
-                               capability, 2 + capability->len);
+                               (char *)capability, 2 + capability->len);
                        /* we don't terminate, still; we just jump to the next one */
                        continue;
                    }
 
+                   peer->handle_ipv6_routes = 1;
                }
            }