diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 20:54:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:14 -0400 |
commit | 0660e03f6b18f19b6bbafe7583265a51b90daf36 (patch) | |
tree | 82cc819ead5ab7858ba211ee8719a3e6d2bb984f /net/ipv6/ip6_tunnel.c | |
parent | d0a92be05ed4aea7d35c2b257e3f9173565fe4eb (diff) |
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
Now the skb->nh union has just one member, .raw, i.e. it is just like the
skb->mac union, strange, no? I'm just leaving it like that till the transport
layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or
->mac_header_offset?), ditto for ->{h,nh}.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index bb65779be7a6..05b59a77bc69 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -602,7 +602,7 @@ ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
602 | skb_reset_network_header(skb2); | 602 | skb_reset_network_header(skb2); |
603 | 603 | ||
604 | /* Try to guess incoming interface */ | 604 | /* Try to guess incoming interface */ |
605 | rt = rt6_lookup(&skb2->nh.ipv6h->saddr, NULL, 0, 0); | 605 | rt = rt6_lookup(&ipv6_hdr(skb2)->saddr, NULL, 0, 0); |
606 | 606 | ||
607 | if (rt && rt->rt6i_dev) | 607 | if (rt && rt->rt6i_dev) |
608 | skb2->dev = rt->rt6i_dev; | 608 | skb2->dev = rt->rt6i_dev; |
@@ -636,10 +636,10 @@ static void ip6ip6_dscp_ecn_decapsulate(struct ip6_tnl *t, | |||
636 | struct sk_buff *skb) | 636 | struct sk_buff *skb) |
637 | { | 637 | { |
638 | if (t->parms.flags & IP6_TNL_F_RCV_DSCP_COPY) | 638 | if (t->parms.flags & IP6_TNL_F_RCV_DSCP_COPY) |
639 | ipv6_copy_dscp(ipv6h, skb->nh.ipv6h); | 639 | ipv6_copy_dscp(ipv6h, ipv6_hdr(skb)); |
640 | 640 | ||
641 | if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6h))) | 641 | if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6h))) |
642 | IP6_ECN_set_ce(skb->nh.ipv6h); | 642 | IP6_ECN_set_ce(ipv6_hdr(skb)); |
643 | } | 643 | } |
644 | 644 | ||
645 | static inline int ip6_tnl_rcv_ctl(struct ip6_tnl *t) | 645 | static inline int ip6_tnl_rcv_ctl(struct ip6_tnl *t) |
@@ -679,10 +679,8 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol, | |||
679 | struct ipv6hdr *ipv6h, | 679 | struct ipv6hdr *ipv6h, |
680 | struct sk_buff *skb)) | 680 | struct sk_buff *skb)) |
681 | { | 681 | { |
682 | struct ipv6hdr *ipv6h; | ||
683 | struct ip6_tnl *t; | 682 | struct ip6_tnl *t; |
684 | 683 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); | |
685 | ipv6h = skb->nh.ipv6h; | ||
686 | 684 | ||
687 | read_lock(&ip6_tnl_lock); | 685 | read_lock(&ip6_tnl_lock); |
688 | 686 | ||
@@ -836,7 +834,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
836 | { | 834 | { |
837 | struct ip6_tnl *t = netdev_priv(dev); | 835 | struct ip6_tnl *t = netdev_priv(dev); |
838 | struct net_device_stats *stats = &t->stat; | 836 | struct net_device_stats *stats = &t->stat; |
839 | struct ipv6hdr *ipv6h = skb->nh.ipv6h; | 837 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
840 | struct ipv6_tel_txoption opt; | 838 | struct ipv6_tel_txoption opt; |
841 | struct dst_entry *dst; | 839 | struct dst_entry *dst; |
842 | struct net_device *tdev; | 840 | struct net_device *tdev; |
@@ -909,7 +907,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
909 | } | 907 | } |
910 | skb_push(skb, sizeof(struct ipv6hdr)); | 908 | skb_push(skb, sizeof(struct ipv6hdr)); |
911 | skb_reset_network_header(skb); | 909 | skb_reset_network_header(skb); |
912 | ipv6h = skb->nh.ipv6h; | 910 | ipv6h = ipv6_hdr(skb); |
913 | *(__be32*)ipv6h = fl->fl6_flowlabel | htonl(0x60000000); | 911 | *(__be32*)ipv6h = fl->fl6_flowlabel | htonl(0x60000000); |
914 | dsfield = INET_ECN_encapsulate(0, dsfield); | 912 | dsfield = INET_ECN_encapsulate(0, dsfield); |
915 | ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield); | 913 | ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield); |
@@ -983,7 +981,7 @@ static inline int | |||
983 | ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) | 981 | ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) |
984 | { | 982 | { |
985 | struct ip6_tnl *t = netdev_priv(dev); | 983 | struct ip6_tnl *t = netdev_priv(dev); |
986 | struct ipv6hdr *ipv6h = skb->nh.ipv6h; | 984 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
987 | int encap_limit = -1; | 985 | int encap_limit = -1; |
988 | __u16 offset; | 986 | __u16 offset; |
989 | struct flowi fl; | 987 | struct flowi fl; |