diff options
Diffstat (limited to 'include/net/sctp/structs.h')
| -rw-r--r-- | include/net/sctp/structs.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index c0d5848c33dc..c2fe2dcc9afc 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -207,6 +207,9 @@ extern struct sctp_globals { | |||
| 207 | * It is a list of sctp_sockaddr_entry. | 207 | * It is a list of sctp_sockaddr_entry. |
| 208 | */ | 208 | */ |
| 209 | struct list_head local_addr_list; | 209 | struct list_head local_addr_list; |
| 210 | |||
| 211 | /* Lock that protects the local_addr_list writers */ | ||
| 212 | spinlock_t addr_list_lock; | ||
| 210 | 213 | ||
| 211 | /* Flag to indicate if addip is enabled. */ | 214 | /* Flag to indicate if addip is enabled. */ |
| 212 | int addip_enable; | 215 | int addip_enable; |
| @@ -242,6 +245,7 @@ extern struct sctp_globals { | |||
| 242 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) | 245 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) |
| 243 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 246 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
| 244 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 247 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
| 248 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | ||
| 245 | #define sctp_addip_enable (sctp_globals.addip_enable) | 249 | #define sctp_addip_enable (sctp_globals.addip_enable) |
| 246 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 250 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
| 247 | 251 | ||
| @@ -737,8 +741,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | |||
| 737 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 741 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
| 738 | struct sctp_sockaddr_entry { | 742 | struct sctp_sockaddr_entry { |
| 739 | struct list_head list; | 743 | struct list_head list; |
| 744 | struct rcu_head rcu; | ||
| 740 | union sctp_addr a; | 745 | union sctp_addr a; |
| 741 | __u8 use_as_src; | 746 | __u8 use_as_src; |
| 747 | __u8 valid; | ||
| 742 | }; | 748 | }; |
| 743 | 749 | ||
| 744 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 750 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
| @@ -1149,7 +1155,9 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
| 1149 | int flags); | 1155 | int flags); |
| 1150 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1156 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
| 1151 | __u8 use_as_src, gfp_t gfp); | 1157 | __u8 use_as_src, gfp_t gfp); |
| 1152 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1158 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
| 1159 | void (*rcu_call)(struct rcu_head *, | ||
| 1160 | void (*func)(struct rcu_head *))); | ||
| 1153 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1161 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
| 1154 | struct sctp_sock *); | 1162 | struct sctp_sock *); |
| 1155 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | 1163 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, |
| @@ -1220,9 +1228,6 @@ struct sctp_ep_common { | |||
| 1220 | * bind_addr.address_list is our set of local IP addresses. | 1228 | * bind_addr.address_list is our set of local IP addresses. |
| 1221 | */ | 1229 | */ |
| 1222 | struct sctp_bind_addr bind_addr; | 1230 | struct sctp_bind_addr bind_addr; |
| 1223 | |||
| 1224 | /* Protection during address list comparisons. */ | ||
| 1225 | rwlock_t addr_lock; | ||
| 1226 | }; | 1231 | }; |
| 1227 | 1232 | ||
| 1228 | 1233 | ||
