patch-2.4.20 linux-2.4.20/net/ipv4/netfilter/ipt_unclean.c
Next file: linux-2.4.20/net/ipv4/proc.c
Previous file: linux-2.4.20/net/ipv4/netfilter/ipt_pkttype.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/net/ipv4/netfilter/ipt_unclean.c
- Orig date:
Fri Dec 21 09:42:05 2001
diff -urN linux-2.4.19/net/ipv4/netfilter/ipt_unclean.c linux-2.4.20/net/ipv4/netfilter/ipt_unclean.c
@@ -211,15 +211,14 @@
/* Bad checksum? Don't print, just say it's unclean. */
/* FIXME: SRC ROUTE packets won't match checksum --RR */
- if (!more_frags && !embedded
+ if (!more_frags && !embedded && udph->check
&& csum_tcpudp_magic(iph->saddr, iph->daddr, datalen, IPPROTO_UDP,
csum_partial((char *)udph, datalen, 0)) != 0)
return 0;
- /* CHECK: Ports can't be zero. */
- if (!udph->source || !udph->dest) {
- limpk("UDP zero ports %u/%u\n",
- ntohs(udph->source), ntohs(udph->dest));
+ /* CHECK: Destination port can't be zero. */
+ if (!udph->dest) {
+ limpk("UDP zero destination port\n");
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)