summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authorbryanv <bryanv@FreeBSD.org>2015-01-27 06:19:30 +0000
committerbryanv <bryanv@FreeBSD.org>2015-01-27 06:19:30 +0000
commitb5fba8dc05f513dfb0ea424a1d5ad6d557f40ab0 (patch)
treea8ab67cb1735c8bc935ccd18de09a564c5ef78e4 /sys/netinet/sctputil.c
parent8459b965f7a842aaabd4b53e080bd15b094fbff5 (diff)
downloadFreeBSD-src-b5fba8dc05f513dfb0ea424a1d5ad6d557f40ab0.zip
FreeBSD-src-b5fba8dc05f513dfb0ea424a1d5ad6d557f40ab0.tar.gz
MFC r272886:
Add context pointer and source address to the UDP tunnel callback These are needed for the forthcoming vxlan implementation. The context pointer means we do not have to use a spare pointer field in the inpcb, and the source address is required to populate vxlan's forwarding table.
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index fde23ef..1e87a17 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -6832,7 +6832,8 @@ sctp_log_trace(uint32_t subsys, const char *str SCTP_UNUSED, uint32_t a, uint32_
#endif
static void
-sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored)
+sctp_recv_udp_tunneled_packet(struct mbuf *m, int off, struct inpcb *ignored,
+ const struct sockaddr *sa SCTP_UNUSED, void *ctx SCTP_UNUSED)
{
struct ip *iph;
@@ -6968,7 +6969,7 @@ sctp_over_udp_start(void)
}
/* Call the special UDP hook. */
if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp4_tun_socket),
- sctp_recv_udp_tunneled_packet))) {
+ sctp_recv_udp_tunneled_packet, NULL))) {
sctp_over_udp_stop();
return (ret);
}
@@ -6992,7 +6993,7 @@ sctp_over_udp_start(void)
}
/* Call the special UDP hook. */
if ((ret = udp_set_kernel_tunneling(SCTP_BASE_INFO(udp6_tun_socket),
- sctp_recv_udp_tunneled_packet))) {
+ sctp_recv_udp_tunneled_packet, NULL))) {
sctp_over_udp_stop();
return (ret);
}
OpenPOWER on IntegriCloud