netfilter: remove unnccessarry memsets
Subsystems (2)
PATCH 1/1 netfilter: remove unnccessarry memsets
Hi Dave!
Since 2.4.23 is out, I am now sending you a couple of pending 2.4.x netfilter fixes.
This mail contains the first one. Please apply.
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
===== net/ipv4/netfilter/ip_conntrack_tftp.c 1.1 vs edited =====
net/ipv4/netfilter/ip_conntrack_tftp.c +0 -2
@@ -94,8 +94,6 @@for (i =0 ; (i <MAX_PORTS ) && ports[i] ; i++) {/* Create helper structure */ -memset (&tftp[i],0 ,sizeof (struct ip_conntrack_helper )); - tftp[i].tuple.dst.protonum =IPPROTO_UDP ; tftp[i].tuple.src.u.udp.port =htons (ports[i]); tftp[i].mask.dst.protonum =0xFFFF ;
===== net/ipv4/netfilter/ip_nat_tftp.c 1.1 vs edited =====
net/ipv4/netfilter/ip_nat_tftp.c +0 -2
@@ -160,8 +160,6 @@ ports[0 ] =TFTP_PORT ;for (i =0 ; (i <MAX_PORTS ) && ports[i] ; i++) { -memset (&tftp[i],0 ,sizeof (struct ip_nat_helper )); - tftp[i].tuple.dst.protonum =IPPROTO_UDP ; tftp[i].tuple.src.u.udp.port =htons (ports[i]); tftp[i].mask.dst.protonum =0xFFFF ;
David S. Miller
AppliedQuoted 1 line · On Sun, 30 Nov 2003 18:00:15 +0530 Harald Welte <[email protected]> wrote:
This mail contains the first one. Please apply.
Applied, thanks Harald.