Search Linux Wireless

Re: [RFC V2] mac80211: mesh portal functionality support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2008-09-21 at 19:50 +0800, YanBo wrote:

> @@ -226,6 +227,8 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
>  void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata);
>  struct mesh_path *mesh_path_lookup(u8 *dst,
>  		struct ieee80211_sub_if_data *sdata);
> +struct mesh_path *mpp_path_lookup(u8 *dst, struct
> ieee80211_sub_if_data *sdata);

there's a line-wrap here for some reason


>  static struct mesh_table *mesh_paths;
> +static struct mesh_table *mpp_paths; /* Store pathes for MPP&MAP */

Can you add a note why we need a separate hash table at all?

> @@ -475,11 +589,19 @@ static int mesh_path_node_copy(struct hlist_node
> *p, struct mesh_table *newtbl)
>  int mesh_pathtbl_init(void)
>  {
>  	mesh_paths = mesh_table_alloc(INIT_PATHS_SIZE_ORDER);
> +	if (!mesh_paths)
> +		return -ENOMEM;
>  	mesh_paths->free_node = &mesh_path_node_free;
>  	mesh_paths->copy_node = &mesh_path_node_copy;
>  	mesh_paths->mean_chain_len = MEAN_CHAIN_LEN;
> -	if (!mesh_paths)
> -		return -ENOMEM;
> +
> +	mpp_paths = mesh_table_alloc(INIT_PATHS_SIZE_ORDER);
> +	if (!mpp_paths)
> + 		return -ENOMEM;

This leaks 'mesh_paths'.

> +	if (mesh_hdr->flags == 2){

that should use the constant you introduced

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux