Date: Fri, 5 Mar 1999 21:51:48 -0800 (PST) From: <timlee@xpeed.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/10414: slirp port patch Message-ID: <199903060551.VAA00737@styx.dsllogic.com>
next in thread | raw e-mail | index | archive | help
>Number: 10414 >Category: ports >Synopsis: slirp port patch >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 5 22:00:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Timothy J. Lee >Release: FreeBSD 3.1-RELEASE i386 >Organization: >Environment: AMD K6-2 PC, 64 MB memory, FreeBSD 3.1-RELEASE >Description: cd /usr/ports/net/slirp make returns ===> slirp-1.0c is marked as broken: tcp_subr.c. >How-To-Repeat: see above >Fix: The tcp_drop() function in tcp_subr.c uses errno as a local variable. This becomes something else after preprocessing (use "gcc -E [defines and stuff] tcp_subr.c" to see the problem. To fix, add the following patch (which just changes errno to err in the tcp_drop() function) to the port: *** tcp_subr.c.orig Fri Dec 29 15:45:51 1995 --- tcp_subr.c Fri Mar 5 18:19:13 1999 *************** *** 236,264 **** * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. */ struct tcpcb * ! tcp_drop(tp, errno) register struct tcpcb *tp; ! int errno; { DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); ! DEBUG_ARG("errno = %d", errno); if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; ! /* if (errno == ETIMEDOUT && tp->t_softerror) ! * errno = tp->t_softerror; */ ! /* so->so_error = errno; */ return (tcp_close(tp)); } /* * Close a TCP control block: --- 236,264 ---- * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. */ struct tcpcb * ! tcp_drop(tp, err) register struct tcpcb *tp; ! int err; { DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); ! DEBUG_ARG("err = %d", err); if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; ! /* if (err == ETIMEDOUT && tp->t_softerror) ! * err = tp->t_softerror; */ ! /* so->so_error = err; */ return (tcp_close(tp)); } /* * Close a TCP control block: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903060551.VAA00737>