diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-01-15 02:53:56 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-15 06:11:41 (GMT) |
commit | ac5132d1a03fe1ebbefb2382b36e829dff056283 (patch) | |
tree | c6485d636e3d8a25a4ead7fd1e6520286816fdfb /include/net/vxlan.h | |
parent | 3511494ce2f3d3b77544c79b87511a4ddb61dc89 (diff) | |
download | linux-ac5132d1a03fe1ebbefb2382b36e829dff056283.tar.xz |
vxlan: Only bind to sockets with compatible flags enabled
A VXLAN net_device looking for an appropriate socket may only consider
a socket which has a matching set of flags/extensions enabled. If
incompatible flags are enabled, return a conflict to have the caller
create a distinct socket with distinct port.
The OVS VXLAN port is kept unaware of extensions at this point.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r-- | include/net/vxlan.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index f4a3583..7be8c34 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -129,6 +129,9 @@ struct vxlan_sock { #define VXLAN_F_REMCSUM_RX 0x400 #define VXLAN_F_GBP 0x800 +/* These flags must match in order for a socket to be shareable */ +#define VXLAN_F_UNSHAREABLE VXLAN_F_GBP + struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port, vxlan_rcv_t *rcv, void *data, bool no_share, u32 flags); |