diff options
| author | David S. Miller <davem@davemloft.net> | 2017-07-03 12:36:42 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-07-03 12:36:42 +0300 |
| commit | 4b821cb200b5ca25de3d98eeb39c0ddebf6d69a5 (patch) | |
| tree | d619f4433dc26c960bb92c57add6f7eb591330bf /include | |
| parent | c1c1d86bdea45880c1843087d40498127d4293c9 (diff) | |
| parent | 4b4c21fad6ae6bd58ff1566f23b0f4f70fdc9a30 (diff) | |
| download | linux-4b821cb200b5ca25de3d98eeb39c0ddebf6d69a5.tar.xz | |
Merge branch 'vxlan-geneve-fix-hlist-corruption'
Jiri Benc says:
====================
vxlan, geneve: fix hlist corruption
Fix memory corruption introduced with the support of both IPv4 and IPv6
sockets in a single device. The same bug is present in VXLAN and Geneve.
====================
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/vxlan.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index b816a0a6686e..326e8498b10e 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -221,9 +221,17 @@ struct vxlan_config { bool no_share; }; +struct vxlan_dev_node { + struct hlist_node hlist; + struct vxlan_dev *vxlan; +}; + /* Pseudo network device */ struct vxlan_dev { - struct hlist_node hlist; /* vni hash table */ + struct vxlan_dev_node hlist4; /* vni hash table for IPv4 socket */ +#if IS_ENABLED(CONFIG_IPV6) + struct vxlan_dev_node hlist6; /* vni hash table for IPv6 socket */ +#endif struct list_head next; /* vxlan's per namespace list */ struct vxlan_sock __rcu *vn4_sock; /* listening socket for IPv4 */ #if IS_ENABLED(CONFIG_IPV6) |
