lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 12 Mar 2007 22:27:17 -0300
From:	"Arnaldo Carvalho de Melo" <acme@...stprotocols.net>
To:	"David Miller" <davem@...emloft.net>
Cc:	"Netdev List" <netdev@...r.kernel.org>
Subject: [PATCH 2/6] [IP]: Introduce ip_hdrlen()

For the common sequence "skb->nh.iph->ihl * 4", removing a good number of open
coded skb->nh.iph uses, now to go after the rest...

Just out of curiosity, here are the idioms found to get the same result:

skb->nh.iph->ihl << 2
skb->nh.iph->ihl<<2
skb->nh.iph->ihl * 4
skb->nh.iph->ihl*4
(skb->nh.iph)->ihl * sizeof(u32)

Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 drivers/net/bnx2.c                             |    2 +-
 drivers/net/ehea/ehea_main.c                   |    4 ++--
 drivers/net/netxen/netxen_nic_hw.c             |    8 +++++---
 drivers/net/netxen/netxen_nic_main.c           |    6 +++---
 drivers/net/sky2.c                             |    3 ++-
 drivers/net/tg3.c                              |    6 +++---
 drivers/s390/net/qeth_eddp.c                   |   13 ++++++++-----
 include/net/ip.h                               |    7 ++++++-
 net/ipv4/ip_fragment.c                         |    4 ++--
 net/ipv4/ip_input.c                            |    4 +---
 net/ipv4/ipmr.c                                |    2 +-
 net/ipv4/ipvs/ip_vs_app.c                      |    4 ++--
 net/ipv4/ipvs/ip_vs_core.c                     |    3 +--
 net/ipv4/ipvs/ip_vs_proto_tcp.c                |   12 +++++-------
 net/ipv4/ipvs/ip_vs_proto_udp.c                |   12 ++++++------
 net/ipv4/netfilter/ip_conntrack_amanda.c       |    2 +-
 net/ipv4/netfilter/ip_conntrack_core.c         |    3 +--
 net/ipv4/netfilter/ip_conntrack_ftp.c          |    4 ++--
 net/ipv4/netfilter/ip_conntrack_helper_h323.c  |    9 ++++-----
 net/ipv4/netfilter/ip_conntrack_helper_pptp.c  |    4 ++--
 net/ipv4/netfilter/ip_conntrack_irc.c          |    4 ++--
 net/ipv4/netfilter/ip_conntrack_proto_icmp.c   |    8 ++++----
 net/ipv4/netfilter/ip_conntrack_proto_sctp.c   |    2 +-
 net/ipv4/netfilter/ip_conntrack_proto_tcp.c    |    2 +-
 net/ipv4/netfilter/ip_conntrack_sip.c          |    2 +-
 net/ipv4/netfilter/ip_conntrack_standalone.c   |    2 +-
 net/ipv4/netfilter/ip_conntrack_tftp.c         |    2 +-
 net/ipv4/netfilter/ip_nat_core.c               |   11 +++++------
 net/ipv4/netfilter/ip_nat_helper.c             |    8 ++++----
 net/ipv4/netfilter/ip_nat_helper_h323.c        |    8 ++++----
 net/ipv4/netfilter/ip_nat_sip.c                |   10 +++++-----
 net/ipv4/netfilter/ip_nat_standalone.c         |    7 +++----
 net/ipv4/netfilter/ip_tables.c                 |    2 +-
 net/ipv4/netfilter/ipt_ECN.c                   |    7 ++++---
 net/ipv4/netfilter/ipt_REJECT.c                |   19 +++++++++----------
 net/ipv4/netfilter/ipt_ecn.c                   |    4 ++--
 net/ipv4/netfilter/iptable_filter.c            |    3 ++-
 net/ipv4/netfilter/iptable_mangle.c            |    3 ++-
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |    8 ++++----
 net/ipv4/netfilter/nf_conntrack_proto_icmp.c   |    6 +++---
 net/ipv4/netfilter/nf_nat_core.c               |   14 +++++++-------
 net/ipv4/netfilter/nf_nat_h323.c               |    8 ++++----
 net/ipv4/netfilter/nf_nat_helper.c             |   12 ++++++------
 net/ipv4/netfilter/nf_nat_sip.c                |   11 ++++++-----
 net/ipv4/netfilter/nf_nat_standalone.c         |    7 +++----
 net/ipv6/netfilter/ip6table_filter.c           |    2 +-
 net/ipv6/netfilter/ip6table_mangle.c           |    2 +-
 47 files changed, 145 insertions(+), 141 deletions(-)

View attachment "0002-IP-Introduce-ip_hdrlen.patch" of type "text/x-patch" (52799 bytes)

Powered by blists - more mailing lists