2012-10-04 09:54:40 +00:00
|
|
|
diff -up net-tools-2.0/lib/inet6.c.inet6-lookup net-tools-2.0/lib/inet6.c
|
2013-06-07 10:35:53 +00:00
|
|
|
--- net-tools-2.0/lib/inet6.c.inet6-lookup 2013-06-07 11:56:33.463094292 +0200
|
|
|
|
+++ net-tools-2.0/lib/inet6.c 2013-06-07 11:57:31.732330709 +0200
|
2011-12-06 18:15:09 +00:00
|
|
|
@@ -149,33 +149,9 @@ static const char *INET6_sprint(struct s
|
2004-09-09 09:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
-static int INET6_getsock(char *bufp, struct sockaddr *sap)
|
|
|
|
-{
|
|
|
|
- struct sockaddr_in6 *sin6;
|
2011-12-06 18:15:09 +00:00
|
|
|
- char *p;
|
2004-09-09 09:10:51 +00:00
|
|
|
-
|
|
|
|
- sin6 = (struct sockaddr_in6 *) sap;
|
|
|
|
- sin6->sin6_family = AF_INET6;
|
|
|
|
- sin6->sin6_port = 0;
|
2011-12-06 18:15:09 +00:00
|
|
|
- sin6->sin6_scope_id = 0;
|
|
|
|
- sin6->sin6_flowinfo = 0;
|
2004-09-09 09:10:51 +00:00
|
|
|
-
|
|
|
|
- if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0)
|
|
|
|
- return (-1);
|
2011-12-06 18:15:09 +00:00
|
|
|
- p = fix_v4_address(bufp, &sin6->sin6_addr);
|
2013-06-07 10:35:53 +00:00
|
|
|
- if (p != bufp)
|
|
|
|
- memcpy(bufp, p, strlen(p)+1);
|
2004-09-09 09:10:51 +00:00
|
|
|
- return 16; /* ?;) */
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static int INET6_input(int type, char *bufp, struct sockaddr *sap)
|
|
|
|
{
|
|
|
|
- switch (type) {
|
|
|
|
- case 1:
|
|
|
|
- return (INET6_getsock(bufp, sap));
|
|
|
|
- default:
|
|
|
|
- return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
|
|
|
|
- }
|
|
|
|
+ return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-10-04 09:54:40 +00:00
|
|
|
diff -up net-tools-2.0/lib/inet6_gr.c.inet6-lookup net-tools-2.0/lib/inet6_gr.c
|
2013-06-07 10:35:53 +00:00
|
|
|
--- net-tools-2.0/lib/inet6_gr.c.inet6-lookup 2013-05-23 05:27:34.000000000 +0200
|
|
|
|
+++ net-tools-2.0/lib/inet6_gr.c 2013-06-07 11:56:33.464094279 +0200
|
2011-12-06 18:15:09 +00:00
|
|
|
@@ -108,7 +108,7 @@ int rprint_fib6(int ext, int numeric)
|
2004-09-09 09:10:51 +00:00
|
|
|
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
|
|
|
|
inet6_aftype.input(1, addr6, (struct sockaddr *) &saddr6);
|
|
|
|
snprintf(addr6, sizeof(addr6), "%s/%d",
|
|
|
|
- inet6_aftype.sprint((struct sockaddr *) &saddr6, 1),
|
|
|
|
+ inet6_aftype.sprint((struct sockaddr *) &saddr6, numeric),
|
|
|
|
prefix_len);
|
|
|
|
|
|
|
|
/* Fetch and resolve the nexthop address. */
|
2011-12-06 18:15:09 +00:00
|
|
|
@@ -117,7 +117,7 @@ int rprint_fib6(int ext, int numeric)
|
2004-09-09 09:10:51 +00:00
|
|
|
naddr6p[4], naddr6p[5], naddr6p[6], naddr6p[7]);
|
|
|
|
inet6_aftype.input(1, naddr6, (struct sockaddr *) &snaddr6);
|
|
|
|
snprintf(naddr6, sizeof(naddr6), "%s",
|
|
|
|
- inet6_aftype.sprint((struct sockaddr *) &snaddr6, 1));
|
|
|
|
+ inet6_aftype.sprint((struct sockaddr *) &snaddr6, numeric));
|
|
|
|
|
|
|
|
/* Decode the flags. */
|
2013-09-10 10:40:21 +00:00
|
|
|
|