summaryrefslogtreecommitdiffstats
path: root/include/net/lwtunnel.h
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2015-07-21 10:43:49 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-21 10:39:04 -0700
commitffce41962ef64b8e685e5b621caf24bf381addd9 (patch)
treea731e4ae211389d6ab5f722177379975a918b54f /include/net/lwtunnel.h
parent19e42e45150672124b6a4341e2bc7982d247f0ac (diff)
downloadlinux-stable-ffce41962ef64b8e685e5b621caf24bf381addd9.tar.gz
linux-stable-ffce41962ef64b8e685e5b621caf24bf381addd9.tar.bz2
linux-stable-ffce41962ef64b8e685e5b621caf24bf381addd9.zip
lwtunnel: support dst output redirect function
This patch introduces lwtunnel_output function to call corresponding lwtunnels output function to xmit the packet. It adds two variants lwtunnel_output and lwtunnel_output6 for ipv4 and ipv6 respectively today. But this is subject to change when lwtstate will reside in dst or dst_metadata (as per upstream discussions). Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/lwtunnel.h')
-rw-r--r--include/net/lwtunnel.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h
index df24b3611ff4..918e03c1dafa 100644
--- a/include/net/lwtunnel.h
+++ b/include/net/lwtunnel.h
@@ -69,6 +69,8 @@ int lwtunnel_fill_encap(struct sk_buff *skb,
int lwtunnel_get_encap_size(struct lwtunnel_state *lwtstate);
struct lwtunnel_state *lwtunnel_state_alloc(int hdr_len);
int lwtunnel_cmp_encap(struct lwtunnel_state *a, struct lwtunnel_state *b);
+int lwtunnel_output(struct sock *sk, struct sk_buff *skb);
+int lwtunnel_output6(struct sock *sk, struct sk_buff *skb);
#else
@@ -127,6 +129,16 @@ static inline int lwtunnel_cmp_encap(struct lwtunnel_state *a,
return 0;
}
+static inline int lwtunnel_output(struct sock *sk, struct sk_buff *skb)
+{
+ return -EOPNOTSUPP;
+}
+
+static inline int lwtunnel_output6(struct sock *sk, struct sk_buff *skb)
+{
+ return -EOPNOTSUPP;
+}
+
#endif
#endif /* __NET_LWTUNNEL_H */