bgpd: setting nexthop doesn't need inet_pton

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index c66f260..921687a 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2190,7 +2190,6 @@
   struct in6_addr peer_address;
   struct bgp_info *bgp_info;
   struct peer *peer;
-  char peer_addr_buf[INET6_ADDRSTRLEN];
 
   if (type == RMAP_BGP)
     {
@@ -2203,19 +2202,13 @@
 	  && peer->su_remote
 	  && sockunion_family (peer->su_remote) == AF_INET6)
 	{
-	  inet_pton (AF_INET6, sockunion2str (peer->su_remote,
-					      peer_addr_buf,
-					      INET6_ADDRSTRLEN),
-		     &peer_address);
+	  peer_address = peer->su_remote->sin6.sin6_addr;
 	}
       else if (CHECK_FLAG (peer->rmap_type, PEER_RMAP_TYPE_OUT)
 	       && peer->su_local
 	       && sockunion_family (peer->su_local) == AF_INET6)
 	{
-	  inet_pton (AF_INET, sockunion2str (peer->su_local,
-					     peer_addr_buf,
-					     INET6_ADDRSTRLEN),
-		     &peer_address);
+	  peer_address = peer->su_local->sin6.sin6_addr;
 	}
 
       if (IN6_IS_ADDR_LINKLOCAL(&peer_address))