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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47CCF71D.2030800@cosmosbay.com>
Date:	Tue, 04 Mar 2008 08:15:41 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	"David S. Miller" <davem@...emloft.net>
CC:	Linux Netdev List <netdev@...r.kernel.org>
Subject: [IPV4]: Add an 'rtable' field in struct sk_buff to alias 'dst' field
 and avoid casts

(Anonymous) unions can help us to avoid ugly casts.

A common cast it the (struct rtable *)skb->dst one.

Defining an union like  :
union {
     struct dst_entry *dst;
     struct rtable *rtable;
};
permits to use dkb->rtable in place.

Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

  include/linux/skbuff.h                  |    5 ++++-
  include/net/inet_sock.h                 |    2 +-
  net/bridge/br_netfilter.c               |    6 +++---
  net/dccp/ipv4.c                         |    7 +++----
  net/ipv4/arp.c                          |    4 ++--
  net/ipv4/icmp.c                         |   10 +++++-----
  net/ipv4/igmp.c                         |    2 +-
  net/ipv4/ip_forward.c                   |    2 +-
  net/ipv4/ip_gre.c                       |    4 ++--
  net/ipv4/ip_input.c                     |    2 +-
  net/ipv4/ip_options.c                   |   16 ++++++++--------
  net/ipv4/ip_output.c                    |   10 +++++-----
  net/ipv4/ip_sockglue.c                  |    2 +-
  net/ipv4/ipip.c                         |    2 +-
  net/ipv4/ipmr.c                         |    6 +++---
  net/ipv4/netfilter/ipt_MASQUERADE.c     |    2 +-
  net/ipv4/netfilter/nf_nat_helper.c      |    4 ++--
  net/ipv4/route.c                        |   22 +++++++++++-----------
  net/ipv4/tcp_ipv4.c                     |    5 ++---
  net/ipv4/udp.c                          |    2 +-
  net/netfilter/nf_conntrack_netbios_ns.c |    2 +-
  net/sched/em_meta.c                     |    4 ++--
  net/sctp/protocol.c                     |    8 ++++----
  23 files changed, 65 insertions(+), 64 deletions(-)


View attachment "rtable_alias.patch" of type "text/plain" (20552 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ