[IPV4]: Add 'rtable' field in struct sk_buff to alias 'dst' and avoid casts
authorEric Dumazet <dada1@cosmosbay.com>
Thu, 6 Mar 2008 02:30:47 +0000 (18:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Mar 2008 02:30:47 +0000 (18:30 -0800)
commitee6b967301b4aa5d4a4b61e2f682f086266db9fb
tree197c2430f87733dc80d00d1971f1be2a0e562358
parenta05c44f6d5fb6cd29da04f96bf5ffaa05f545ac5
[IPV4]: Add 'rtable' field in struct sk_buff to alias 'dst' 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 skb->rtable in place.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
23 files changed:
include/linux/skbuff.h
include/net/inet_sock.h
net/bridge/br_netfilter.c
net/dccp/ipv4.c
net/ipv4/arp.c
net/ipv4/icmp.c
net/ipv4/igmp.c
net/ipv4/ip_forward.c
net/ipv4/ip_gre.c
net/ipv4/ip_input.c
net/ipv4/ip_options.c
net/ipv4/ip_output.c
net/ipv4/ip_sockglue.c
net/ipv4/ipip.c
net/ipv4/ipmr.c
net/ipv4/netfilter/ipt_MASQUERADE.c
net/ipv4/netfilter/nf_nat_helper.c
net/ipv4/route.c
net/ipv4/tcp_ipv4.c
net/ipv4/udp_ipv4.c
net/netfilter/nf_conntrack_netbios_ns.c
net/sched/em_meta.c
net/sctp/protocol.c