From 448e56d8e0e300cbc82d8512fc770c8d3faeab82 Mon Sep 17 00:00:00 2001 From: Hasso Tepper Date: Thu, 4 Sep 2008 11:54:24 +0000 Subject: [PATCH] Forgot this file in the "RFC3542 support" SoC project commit. --- crypto/telnet/telnet/commands.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/crypto/telnet/telnet/commands.c b/crypto/telnet/telnet/commands.c index c016e76dc7..990d0079b2 100644 --- a/crypto/telnet/telnet/commands.c +++ b/crypto/telnet/telnet/commands.c @@ -32,7 +32,7 @@ * * @(#)commands.c 8.4 (Berkeley) 5/30/95 * $FreeBSD: src/crypto/telnet/telnet/commands.c,v 1.12.2.7 2003/04/23 07:16:32 ru Exp $ - * $DragonFly: src/crypto/telnet/telnet/commands.c,v 1.2 2003/06/17 04:24:37 dillon Exp $ + * $DragonFly: src/crypto/telnet/telnet/commands.c,v 1.3 2008/09/04 11:54:24 hasso Exp $ */ #include @@ -77,7 +77,7 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 -#endif MAXHOSTNAMELEN +#endif /* MAXHOSTNAMELEN */ typedef int (*intrtn_t)(int, char **); @@ -2885,7 +2885,7 @@ sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, #ifdef INET6 if (ai->ai_family == AF_INET6) { - cmsg = inet6_rthdr_init(*cpp, IPV6_RTHDR_TYPE_0); + cmsg = NULL; if (*cp != '@') return -1; *protop = IPPROTO_IPV6; @@ -2961,8 +2961,6 @@ sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, #ifdef INET6 if (res->ai_family == AF_INET6) { sin6 = (struct sockaddr_in6 *)res->ai_addr; - inet6_rthdr_add(cmsg, &sin6->sin6_addr, - IPV6_RTHDR_LOOSE); } else #endif { @@ -2980,9 +2978,7 @@ sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, #ifdef INET6 if (res->ai_family == AF_INET6) { if (((char *)CMSG_DATA(cmsg) + - sizeof(struct ip6_rthdr) + - ((inet6_rthdr_segments(cmsg) + 1) * - sizeof(struct in6_addr))) > ep) + sizeof(struct ip6_rthdr)) > ep) return -1; } else #endif @@ -2992,8 +2988,7 @@ sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, } #ifdef INET6 if (res->ai_family == AF_INET6) { - inet6_rthdr_lasthop(cmsg, IPV6_RTHDR_LOOSE); - *lenp = cmsg->cmsg_len; + *lenp = 0; } else #endif { -- 2.41.0