aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_tunnel.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 22:15:08 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:47 -0500
commitef76bc23ef2acf20c8f7f841a542d8ab74c827c6 (patch)
tree11ae8004f4c25ac91339f13a86fdd9f170faeb2e /net/ipv6/ip6_tunnel.c
parentc439cb2e4b13cf1cb2abcd006b906315a3381323 (diff)
[IPV6]: Add ip6_local_out
Most callers of the LOCAL_OUT chain will set the IP packet length before doing so. They also share the same output function dst_output. This patch creates a new function called ip6_local_out which does all of that and converts the appropriate users over to it. Apart from removing duplicate code, it will also help in merging the IPsec output path. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r--net/ipv6/ip6_tunnel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index a4051afaf776..29b5321e39c3 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -910,15 +910,13 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
910 *(__be32*)ipv6h = fl->fl6_flowlabel | htonl(0x60000000); 910 *(__be32*)ipv6h = fl->fl6_flowlabel | htonl(0x60000000);
911 dsfield = INET_ECN_encapsulate(0, dsfield); 911 dsfield = INET_ECN_encapsulate(0, dsfield);
912 ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield); 912 ipv6_change_dsfield(ipv6h, ~INET_ECN_MASK, dsfield);
913 ipv6h->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
914 ipv6h->hop_limit = t->parms.hop_limit; 913 ipv6h->hop_limit = t->parms.hop_limit;
915 ipv6h->nexthdr = proto; 914 ipv6h->nexthdr = proto;
916 ipv6_addr_copy(&ipv6h->saddr, &fl->fl6_src); 915 ipv6_addr_copy(&ipv6h->saddr, &fl->fl6_src);
917 ipv6_addr_copy(&ipv6h->daddr, &fl->fl6_dst); 916 ipv6_addr_copy(&ipv6h->daddr, &fl->fl6_dst);
918 nf_reset(skb); 917 nf_reset(skb);
919 pkt_len = skb->len; 918 pkt_len = skb->len;
920 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, 919 err = ip6_local_out(skb);
921 skb->dst->dev, dst_output);
922 920
923 if (net_xmit_eval(err) == 0) { 921 if (net_xmit_eval(err) == 0) {
924 stats->tx_bytes += pkt_len; 922 stats->tx_bytes += pkt_len;