diff options
author | Arnaud Ebalard <arno@natisbad.org> | 2010-06-01 21:35:01 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-02 07:08:31 -0700 |
commit | 20c59de2e6b6bc74bbf714dcd4e720afe8d516cf (patch) | |
tree | 45e5c62e286368f8259b844cb7cf796d19066fb0 /include/net/ipv6.h | |
parent | d92222e27fdc98d73df25f3d49fb1ff3a3369bec (diff) | |
download | blackbird-op-linux-20c59de2e6b6bc74bbf714dcd4e720afe8d516cf.tar.gz blackbird-op-linux-20c59de2e6b6bc74bbf714dcd4e720afe8d516cf.zip |
ipv6: Refactor update of IPv6 flowi destination address for srcrt (RH) option
There are more than a dozen occurrences of following code in the
IPv6 stack:
if (opt && opt->srcrt) {
struct rt0_hdr *rt0 = (struct rt0_hdr *) opt->srcrt;
ipv6_addr_copy(&final, &fl.fl6_dst);
ipv6_addr_copy(&fl.fl6_dst, rt0->addr);
final_p = &final;
}
Replace those with a helper. Note that the helper overrides final_p
in all cases. This is ok as final_p was previously initialized to
NULL when declared.
Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 2600b69757b8..f5808d596aab 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -551,6 +551,10 @@ extern int ipv6_ext_hdr(u8 nexthdr); extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); +extern struct in6_addr *fl6_update_dst(struct flowi *fl, + const struct ipv6_txoptions *opt, + struct in6_addr *orig); + /* * socket options (ipv6_sockglue.c) */ |