diff options
-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 */ |