From: Harlan Stenn Date: Thu, 17 Jan 2002 22:52:47 +0000 (-0500) Subject: Lose the source port check. Too many folks are going thru Port and X-Git-Tag: NTP_4_1_1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=980c295030f2de1cccf7539e7fcaf5fa002b35fd;p=thirdparty%2Fntp.git Lose the source port check. Too many folks are going thru Port and Address Translators, and present wisdom says that one should not trust source ports anyway. bk: 3c4755bfX-q93gSrOSHjQVFlkz0M6w --- diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index b5bb80f3f..fc95016e5 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -309,11 +309,7 @@ receive( #endif if (restrict_mask & RES_IGNORE) return; /* no anything */ - if (!(SRCPORT(&rbufp->recv_srcadr) == NTP_PORT || - SRCPORT(&rbufp->recv_srcadr) >= IPPORT_RESERVED)) { - sys_badlength++; - return; /* invalid port */ - } + pkt = &rbufp->recv_pkt; if (PKT_VERSION(pkt->li_vn_mode) == NTP_VERSION) { sys_newversionpkt++; /* new version */