Skip to content

Commit a495f83

Browse files
cdelstondavem330
authored andcommitted
ipv6: Export ipv6 functions for use by other protocols
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 <celston@katalix.com> Signed-off-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f9bac8d commit a495f83

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

net/ipv6/datagram.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/ipv6.h>
2323
#include <linux/route.h>
2424
#include <linux/slab.h>
25+
#include <linux/export.h>
2526

2627
#include <net/ipv6.h>
2728
#include <net/ndisc.h>
@@ -202,6 +203,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
202203
fl6_sock_release(flowlabel);
203204
return err;
204205
}
206+
EXPORT_SYMBOL_GPL(ip6_datagram_connect);
205207

206208
void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
207209
__be16 port, u32 info, u8 *payload)
@@ -414,6 +416,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
414416
out:
415417
return err;
416418
}
419+
EXPORT_SYMBOL_GPL(ipv6_recv_error);
417420

418421
/*
419422
* Handle IPV6_RECVPATHMTU
@@ -868,3 +871,4 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
868871
exit_f:
869872
return err;
870873
}
874+
EXPORT_SYMBOL_GPL(datagram_send_ctl);

net/ipv6/exthdrs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
883883

884884
return opt;
885885
}
886+
EXPORT_SYMBOL_GPL(ipv6_fixup_options);
886887

887888
/**
888889
* fl6_update_dst - update flowi destination address with info given

net/ipv6/ip6_flowlabel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space,
294294
opt_space->opt_flen = fopt->opt_flen;
295295
return opt_space;
296296
}
297+
EXPORT_SYMBOL_GPL(fl6_merge_options);
297298

298299
static unsigned long check_linger(unsigned long ttl)
299300
{

net/ipv6/ip6_output.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
15351535
IP6_INC_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
15361536
return err;
15371537
}
1538+
EXPORT_SYMBOL_GPL(ip6_append_data);
15381539

15391540
static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
15401541
{
@@ -1638,6 +1639,7 @@ int ip6_push_pending_frames(struct sock *sk)
16381639
IP6_INC_STATS(net, rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
16391640
goto out;
16401641
}
1642+
EXPORT_SYMBOL_GPL(ip6_push_pending_frames);
16411643

16421644
void ip6_flush_pending_frames(struct sock *sk)
16431645
{
@@ -1652,3 +1654,4 @@ void ip6_flush_pending_frames(struct sock *sk)
16521654

16531655
ip6_cork_release(inet_sk(sk), inet6_sk(sk));
16541656
}
1657+
EXPORT_SYMBOL_GPL(ip6_flush_pending_frames);

0 commit comments

Comments
 (0)