diff options
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r-- | include/net/sctp/structs.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ee4559b11302..baff49dfcdbd 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 | ||
@@ -417,6 +421,7 @@ struct sctp_signed_cookie { | |||
417 | * internally. | 421 | * internally. |
418 | */ | 422 | */ |
419 | union sctp_addr_param { | 423 | union sctp_addr_param { |
424 | struct sctp_paramhdr p; | ||
420 | struct sctp_ipv4addr_param v4; | 425 | struct sctp_ipv4addr_param v4; |
421 | struct sctp_ipv6addr_param v6; | 426 | struct sctp_ipv6addr_param v6; |
422 | }; | 427 | }; |
@@ -726,6 +731,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
726 | struct iovec *data); | 731 | struct iovec *data); |
727 | void sctp_chunk_free(struct sctp_chunk *); | 732 | void sctp_chunk_free(struct sctp_chunk *); |
728 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); | 733 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); |
734 | void *sctp_addto_param(struct sctp_chunk *, int len, const void *data); | ||
729 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, | 735 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, |
730 | const struct sctp_association *, | 736 | const struct sctp_association *, |
731 | struct sock *); | 737 | struct sock *); |
@@ -736,8 +742,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | |||
736 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 742 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
737 | struct sctp_sockaddr_entry { | 743 | struct sctp_sockaddr_entry { |
738 | struct list_head list; | 744 | struct list_head list; |
745 | struct rcu_head rcu; | ||
739 | union sctp_addr a; | 746 | union sctp_addr a; |
740 | __u8 use_as_src; | 747 | __u8 use_as_src; |
748 | __u8 valid; | ||
741 | }; | 749 | }; |
742 | 750 | ||
743 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 751 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
@@ -1148,7 +1156,9 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
1148 | int flags); | 1156 | int flags); |
1149 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1157 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1150 | __u8 use_as_src, gfp_t gfp); | 1158 | __u8 use_as_src, gfp_t gfp); |
1151 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1159 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1160 | void fastcall (*rcu_call)(struct rcu_head *, | ||
1161 | void (*func)(struct rcu_head *))); | ||
1152 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1162 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1153 | struct sctp_sock *); | 1163 | struct sctp_sock *); |
1154 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | 1164 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, |
@@ -1219,9 +1229,6 @@ struct sctp_ep_common { | |||
1219 | * bind_addr.address_list is our set of local IP addresses. | 1229 | * bind_addr.address_list is our set of local IP addresses. |
1220 | */ | 1230 | */ |
1221 | struct sctp_bind_addr bind_addr; | 1231 | struct sctp_bind_addr bind_addr; |
1222 | |||
1223 | /* Protection during address list comparisons. */ | ||
1224 | rwlock_t addr_lock; | ||
1225 | }; | 1232 | }; |
1226 | 1233 | ||
1227 | 1234 | ||