Skip to content

Commit

Permalink
ipv6: Export ipv6 functions for use by other protocols
Browse files Browse the repository at this point in the history
For implementing other protocols on top of IPv6, such as L2TPv3's IP
encapsulation over ipv6, we'd like to call some IPv6 functions which
are not currently exported. This patch exports them.

Signed-off-by: Chris Elston <[email protected]>
Signed-off-by: James Chapman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
cdelston authored and davem330 committed May 1, 2012
1 parent f9bac8d commit a495f83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/ipv6.h>
#include <linux/route.h>
#include <linux/slab.h>
#include <linux/export.h>

#include <net/ipv6.h>
#include <net/ndisc.h>
Expand Down Expand Up @@ -202,6 +203,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
fl6_sock_release(flowlabel);
return err;
}
EXPORT_SYMBOL_GPL(ip6_datagram_connect);

void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
__be16 port, u32 info, u8 *payload)
Expand Down Expand Up @@ -414,6 +416,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
out:
return err;
}
EXPORT_SYMBOL_GPL(ipv6_recv_error);

/*
* Handle IPV6_RECVPATHMTU
Expand Down Expand Up @@ -868,3 +871,4 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
exit_f:
return err;
}
EXPORT_SYMBOL_GPL(datagram_send_ctl);
1 change: 1 addition & 0 deletions net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,

return opt;
}
EXPORT_SYMBOL_GPL(ipv6_fixup_options);

/**
* fl6_update_dst - update flowi destination address with info given
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ip6_flowlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space,
opt_space->opt_flen = fopt->opt_flen;
return opt_space;
}
EXPORT_SYMBOL_GPL(fl6_merge_options);

static unsigned long check_linger(unsigned long ttl)
{
Expand Down
3 changes: 3 additions & 0 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
IP6_INC_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
return err;
}
EXPORT_SYMBOL_GPL(ip6_append_data);

static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
{
Expand Down Expand Up @@ -1638,6 +1639,7 @@ int ip6_push_pending_frames(struct sock *sk)
IP6_INC_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
goto out;
}
EXPORT_SYMBOL_GPL(ip6_push_pending_frames);

void ip6_flush_pending_frames(struct sock *sk)
{
Expand All @@ -1652,3 +1654,4 @@ void ip6_flush_pending_frames(struct sock *sk)

ip6_cork_release(inet_sk(sk), inet6_sk(sk));
}
EXPORT_SYMBOL_GPL(ip6_flush_pending_frames);

0 comments on commit a495f83

Please sign in to comment.