diff options
author | brian <brian@cvs.openbsd.org> | 2001-09-13 10:32:55 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2001-09-13 10:32:55 +0000 |
commit | 604962c013f7dd73868ccaf5fdf3cbdf52aa99b1 (patch) | |
tree | 6f54468ba73b5616dfb37c28518fab8588c328fb /usr.sbin | |
parent | d423230f8c9ef2350db1955e93ec68b443eb4fa3 (diff) |
Add TFTP support; FreeBSD
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/alias.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ppp/alias.c b/usr.sbin/ppp/ppp/alias.c index 6c1e9156cbc..caef199faaa 100644 --- a/usr.sbin/ppp/ppp/alias.c +++ b/usr.sbin/ppp/ppp/alias.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: alias.c,v 1.15 2001/08/21 04:09:15 brian Exp $ + * $OpenBSD: alias.c,v 1.16 2001/09/13 10:32:54 brian Exp $ */ /* @@ -134,6 +134,7 @@ #define CUSEEME_PORT_NUMBER 7648 #define RTSP_CONTROL_PORT_NUMBER_1 554 #define RTSP_CONTROL_PORT_NUMBER_2 7070 +#define TFTP_PORT_NUMBER 69 #define PPTP_CONTROL_PORT_NUMBER 1723 @@ -837,6 +838,14 @@ UdpAliasOut(struct ip *pip) || ntohs(ud->uh_sport) == NETBIOS_NS_PORT_NUMBER) AliasHandleUdpNbtNS(pip, link, &pip->ip_src, &ud->uh_sport, &alias_address, &alias_port); +/* + * We don't know in advance what TID the TFTP server will choose, + * so we create a wilcard link (destination port is unspecified) + * that will match any TID from a given destination. + */ + else if (ntohs(ud->uh_dport) == TFTP_PORT_NUMBER) + FindRtspOut(pip->ip_src, pip->ip_dst, + ud->uh_sport, alias_port, IPPROTO_UDP); /* If UDP checksum is not zero, adjust since source port is */ /* being aliased and source address is being altered */ |